fix: simplify compatiblity checks (#12) #74
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: Review | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- uses: pre-commit/action@v3.0.0 | |
checks: | |
name: Check typing and linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Setup env | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Bootstrap Poetry | |
run: | | |
pip install pipx | |
pipx install poetry | |
pipx install flake8 | |
pipx install isort | |
pipx install black | |
- name: Install dependencies | |
run: poetry install --all-extras | |
- name: Run mypy | |
run: poetry run mypy | |
- name: Run flake8 | |
run: poetry run flake8 | |
- name: Run isort | |
run: poetry run isort . -c | |
- name: Run black | |
run: poetry run black . --check | |
tests: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.poetry-version }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-2022, macos-12] | |
python-version: ["3.9", "3.12"] | |
poetry-version: | |
- "git+https://github.com/python-poetry/poetry.git" | |
- "poetry==1.5.0" | |
- "poetry==1.5.1" | |
- "poetry==1.6.1" | |
- "poetry==1.7.1" | |
- "poetry==1.8.3" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup env | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Bootstrap Poetry | |
run: | | |
pip install pipx | |
pipx install poetry | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
poetry install --only main --only test | |
poetry run pip install ${{ matrix.poetry-version }} | |
- name: Run tests | |
run: poetry run pytest |