Create release.yml #28
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: workflow | |
on: [push, pull_request] | |
jobs: | |
lock: | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: curl -sSL https://install.python-poetry.org | python3 - | |
- run: poetry lock | |
- uses: actions/cache@v4 | |
with: | |
path: poetry.lock | |
key: ${{ github.sha }}-${{ matrix.python-version }} | |
pytest: | |
needs: lock | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v4 | |
with: | |
path: poetry.lock | |
key: ${{ github.sha }}-${{ matrix.python-version }} | |
- run: curl -sSL https://install.python-poetry.org | python3 - | |
- run: poetry install | |
- run: poetry run pytest --verbose | |
mypy: | |
needs: lock | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v4 | |
with: | |
path: poetry.lock | |
key: ${{ github.sha }}-${{ matrix.python-version }} | |
- run: curl -sSL https://install.python-poetry.org | python3 - | |
- run: poetry install | |
- run: poetry run mypy | |
isort: | |
needs: lock | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: actions/cache@v4 | |
with: | |
path: poetry.lock | |
key: ${{ github.sha }}-3.12 | |
- run: curl -sSL https://install.python-poetry.org | python3 - | |
- run: poetry install | |
- run: poetry run isort --check --diff src tests | |
black: | |
needs: lock | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: actions/cache@v4 | |
with: | |
path: poetry.lock | |
key: ${{ github.sha }}-3.12 | |
- run: curl -sSL https://install.python-poetry.org | python3 - | |
- run: poetry install | |
- run: poetry run black --check src/ tests/ |