Push coverage report only once (#88) #135
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: Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
include: | |
- python-version: '3.8' | |
tox-env: py38-django42 | |
- python-version: '3.9' | |
tox-env: py39-django42 | |
- python-version: '3.10' | |
tox-env: py310-django42 | |
- python-version: '3.11' | |
tox-env: py311-django42 | |
- python-version: '3.12' | |
tox-env: py312-django42 | |
- python-version: '3.10' | |
tox-env: py310-django50 | |
- python-version: '3.11' | |
tox-env: py311-django50 | |
- python-version: '3.12' | |
tox-env: py312-django50 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools tox | |
- name: Run tests | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
run: | | |
tox -v | |
codecov: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools tox | |
- name: Run tests | |
env: | |
TOXENV: codecov | |
run: | | |
tox -v | |
- name: Upload coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 2 | |
matrix: | |
include: | |
- python-version: '3.12' | |
tox-env: flake8 | |
- python-version: '3.12' | |
tox-env: isort | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools tox | |
- name: Run tests | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
run: | | |
tox -v |