chore(deps): bump actions/cache from 3.3.3 to 4.0.0 #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
lint: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10'] | |
poetry-version: [1.3.2] | |
os: [ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: snok/install-poetry@v1.3 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4.0.0 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }} | |
- name: Install dependencies | |
run: poetry install | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
- name: lint | |
run: | | |
source .venv/bin/activate | |
poetry run poe lint | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10'] | |
poetry-version: [1.3.2] | |
os: [ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: snok/install-poetry@v1.3 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4.0.0 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }} | |
- name: Install dependencies | |
run: poetry install | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
- name: Test | |
run: | | |
source .venv/bin/activate | |
poetry run poe test . | |
release: | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/flashgeotext | |
permissions: | |
id-token: write | |
contents: write | |
needs: [lint, test] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# This action uses Python Semantic Release v8 | |
- name: Python Semantic Release | |
id: release | |
uses: python-semantic-release/python-semantic-release@v8.7.2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | |
# See https://github.com/actions/runner/issues/1173 | |
if: steps.release.outputs.released == 'true' | |
- name: Publish package distributions to GitHub Releases | |
uses: python-semantic-release/upload-to-gh-release@main | |
if: steps.release.outputs.released == 'true' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |