| 1 |
name: CodeCov tests |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
unit-tests: |
| 7 |
runs-on: ${{ matrix.os }} |
| 8 |
strategy: |
| 9 |
fail-fast: false |
| 10 |
matrix: |
| 11 |
python-version: ['3.8', '3.9', '3.10'] |
| 12 |
django-version: ['3.2', '4.0', '4.1'] |
| 13 |
os: [ |
| 14 |
ubuntu-20.04, |
| 15 |
] |
| 16 |
|
| 17 |
steps: |
| 18 |
- uses: actions/checkout@v3 |
| 19 |
- name: Set up Python ${{ matrix.python-version }} |
| 20 |
uses: actions/setup-python@v4 |
| 21 |
with: |
| 22 |
python-version: ${{ matrix.python-version }} |
| 23 |
- name: Install dependencies |
| 24 |
run: | |
| 25 |
python -m pip install --upgrade pip |
| 26 |
pip install django==${{ matrix.django-version }} coverage |
| 27 |
python setup.py install |
| 28 |
|
| 29 |
- name: Run coverage |
| 30 |
run: coverage run setup.py test |
| 31 |
|
| 32 |
- name: Upload Coverage to Codecov |
| 33 |
uses: codecov/codecov-action@v1 |
| 34 |
|
| 35 |
unit-tests-future-versions: |
| 36 |
# Runs for all Django/Python versions which are not yet supported |
| 37 |
runs-on: ${{ matrix.os }} |
| 38 |
strategy: |
| 39 |
fail-fast: false |
| 40 |
matrix: |
| 41 |
python-version: ['3.10', '3.11'] |
| 42 |
django-version: [ |
| 43 |
'https://github.com/django/django/archive/main.tar.gz' |
| 44 |
] |
| 45 |
os: [ |
| 46 |
ubuntu-20.04, |
| 47 |
] |
| 48 |
|
| 49 |
steps: |
| 50 |
- uses: actions/checkout@v3 |
| 51 |
- name: Set up Python ${{ matrix.python-version }} |
| 52 |
|
| 53 |
uses: actions/setup-python@v4 |
| 54 |
with: |
| 55 |
python-version: ${{ matrix.python-version }} |
| 56 |
- name: Install dependencies |
| 57 |
run: | |
| 58 |
python -m pip install --upgrade pip |
| 59 |
pip install ${{ matrix.django-version }} coverage |
| 60 |
python setup.py install |
| 61 |
|
| 62 |
- name: Run coverage |
| 63 |
run: coverage run setup.py test |
| 64 |
continue-on-error: true |
| 65 |
|
| 66 |
- name: Upload Coverage to Codecov |
| 67 |
uses: codecov/codecov-action@v3 |