Merge pull request #18 from aaghamohammadi/dev #85
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: Quality Checks | |
on: | |
- push | |
- pull_request | |
jobs: | |
format: | |
name: Check formatting | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Format with black | |
run: tox -e format | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run linter with flake8 | |
run: tox -e lint | |
typecheck: | |
name: Type check | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Type check with mypy | |
run: python -m tox -e typecheck | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false # Whether to cancel all jobs if any matrix job fails | |
matrix: | |
include: | |
- {python-version: "3.11", toxenv: "py311"} | |
- {python-version: "3.10", toxenv: "py310"} | |
- {python-version: "3.9", toxenv: "py39"} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Execute tests with pytest | |
run: tox -e ${{ matrix.toxenv }} | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
if: matrix.python-version == '3.10' |