Chore(deps-dev): bump mypy from 1.13.0 to 1.14.0 #772
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: Unit testing, formatting & linting | |
on: [push] | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Cache multiple paths | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
~/.cache/pre-commit | |
key: ${{ runner.os }}-3.11-${{ hashFiles('**/.pre-commit-config.yaml') }} | |
- run: pip install -U pre-commit | |
- run: pre-commit run -a | |
testing: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.ref_name }}-${{ matrix.python-version }} | |
cancel-in-progress: true | |
strategy: | |
matrix: | |
python-version: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache multiple Pips | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
.venv | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- run: pip install -U poetry | |
- run: poetry config virtualenvs.in-project true | |
- run: poetry install --sync | |
- run: make test | |
- run: make mypy | |
publish_package: | |
runs-on: ubuntu-latest | |
needs: | |
- testing | |
- linting | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Cache Pip | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
.venv | |
key: ${{ runner.os }}-3.10-${{ hashFiles('**/poetry.lock') }} | |
- run: pip install -U poetry | |
- run: poetry build | |
# From https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi-and-testpypi | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |