-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (36 loc) · 1.04 KB
/
python-tests.yml
File metadata and controls
43 lines (36 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Python Tests
on:
push:
branches: [main]
pull_request:
branches:
- "**"
jobs:
python-tests:
name: Run Python Tests and Coverage
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.11", "3.12"]
toxenv: [quality, docs, django42, django52]
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r requirements/pip.txt tox
- name: Run tests with Tox (${{ matrix.toxenv }})
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true