Add mypy
to the project
#12
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: Run tests | |
on: | |
push: | |
branches-ignore: | |
- 'wip-*' | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
branches-ignore: | |
- 'wip-*' | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: mypy lint | |
run: mypy | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 6 | |
matrix: | |
python: ["3.8", "3.9", "3.10", "3.11", "pypy3.9"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov | |
- name: Test with Python ${{ matrix.python }} | |
run: pytest | |
- name: Report coverage | |
run: pytest --cov=otpauth --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
flags: unittests | |
name: GitHub |