-
-
Notifications
You must be signed in to change notification settings - Fork 25
38 lines (38 loc) · 1.24 KB
/
tests.yml
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
name: Tests
on: [push, pull_request]
jobs:
unittests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["django~=3.2", "django~=4.1", "django~=4.2"]
optional-dependencies: ["optional-deps", "no-optional-deps"]
env:
OS: ubuntu-latest
PYTHON: ${{ matrix.python-version }}
DJANGO: ${{ matrix.django-version }}
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install "${{ matrix.django-version }}"
pip install -e .[test]
- name: Install optional dependencies
if: matrix.optional-dependencies == 'optional-deps'
run: pip install -e .[optional]
- name: Run tests and generate coverage report
run: coverage run
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
env_vars: OS,PYTHON,DJANGO
name: codecov-umbrella
fail_ci_if_error: true
verbose: true