shorted a line to meet PEP8 in the test github action #2
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: tests | |
on: | |
# Trigger the tests workflow on push or pull requests. | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- master | |
jobs: | |
run_tox: | |
name: tox run (${{ matrix.python-version }} on ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.9"] | |
os: ["ubuntu-22.04"] | |
include: | |
- python-version: "3.7" | |
os: "ubuntu-22.04" | |
coverage: true | |
mypy: true | |
pep8: true | |
- python-verson: "3.11" | |
os: "ubuntu-22.04" | |
mypy: true | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
# Steps to run in each job. | |
# Some are GitHub actions, others run shell commands. | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install tox | |
python --version | |
pip --version | |
tox --version | |
- name: Setup test suite | |
run: | | |
tox run -vv --notest | |
- name: Run test suite | |
run: | | |
tox run --skip-pkg-install | |
- name: Check pep8 | |
if: matrix.pep8 | |
run: | | |
tox run -e pep8 | |
- name: Check mypy | |
if: matrix.mypy | |
run: | | |
tox run -e mypy | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
if: matrix.coverage | |
with: | |
env_vars: OS,PYTHON | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true |