Delegate interpreting the yaml away from collection #226
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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
pytest-version: ["~=7.2", "~=8.1"] | |
# TODO: remove after several new versions of mypy | |
mypy-version: ["~=1.7", "~=1.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -U pip setuptools wheel | |
pip install -e . | |
# Force correct `pytest` version for different envs: | |
pip install -U "pytest${{ matrix.pytest-version }}" | |
# Force correct `mypy` version: | |
pip install -U "mypy${{ matrix.mypy-version }}" | |
- name: Run tests | |
run: pytest | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
pip install -U pip setuptools wheel | |
pip install -r requirements.txt | |
- name: Run linters | |
run: | | |
mypy . | |
black --check pytest_mypy_plugins setup.py | |
isort --check --diff . |