Fix of default test executions summary for non-first feature #50
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: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
name: Tests | |
needs: lint | |
strategy: | |
matrix: | |
name: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] | |
include: | |
- name: "3.7" | |
python: "3.7" | |
tox_env: "py37" | |
- name: "3.8" | |
python: "3.8" | |
tox_env: "py38" | |
- name: "3.9" | |
python: "3.9" | |
tox_env: "py39" | |
- name: "3.10" | |
python: "3.10" | |
tox_env: "py310" | |
use_coverage: true | |
- name: "3.11" | |
python: "3.11" | |
tox_env: "py311" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install packages | |
run: pip install tox coverage | |
- name: Run tests without coverage | |
if: "! matrix.use_coverage" | |
run: "python -m tox -e ${{ matrix.tox_env }}" | |
- name: Run tests with coverage | |
if: "matrix.use_coverage" | |
run: "python -m tox -e ${{ matrix.tox_env }}-coverage" | |
- name: Generate coverage report | |
if: "matrix.use_coverage" | |
run: python -m coverage xml | |
- name: Upload coverage to Codecov | |
if: "matrix.use_coverage" | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
verbose: true | |
lint: | |
runs-on: ubuntu-latest | |
name: flake8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install packages | |
run: pip install tox | |
- name: Run tests | |
run: tox -e flake8 |