Skip to content

Commit 83d84d0

Browse files
slivercn2ygk
andauthored
Use one GitHub runner per Python version (#1011)
* Moving from tox-gh-actions to tox-py (following DRF) * Move configuration what tests are allowed to failed into tox configuration instead of GitHub settings * Simplification of configuration as tox has the lead and no additional configuration is needed. Co-authored-by: Alan Crosswell <[email protected]>
1 parent d025163 commit 83d84d0

File tree

2 files changed

+7
-27
lines changed

2 files changed

+7
-27
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ jobs:
55
test:
66
name: Run test
77
runs-on: ubuntu-latest
8-
continue-on-error: ${{ matrix.django-rest-framework == 'master' }}
98
strategy:
109
fail-fast: false
1110
matrix:
1211
python-version: ["3.6", "3.7", "3.8", "3.9"]
13-
django: ["2.2", "3.0", "3.1", "3.2"]
14-
django-rest-framework: ["3.12", "master"]
1512
env:
1613
PYTHON: ${{ matrix.python-version }}
17-
DJANGO: ${{ matrix.django }}
18-
DJANGO_REST_FRAMEWORK: ${{ matrix.django-rest-framework }}
1914
steps:
2015
- uses: actions/checkout@v2
2116
- name: Set up Python ${{ matrix.python-version }}
@@ -25,13 +20,13 @@ jobs:
2520
- name: Install dependencies
2621
run: |
2722
python -m pip install --upgrade pip
28-
pip install tox tox-gh-actions
29-
- name: Test with tox
30-
run: tox
23+
pip install tox tox-py
24+
- name: Run tox targets for ${{ matrix.python-version }}
25+
run: tox --py current
3126
- name: Upload coverage report
3227
uses: codecov/codecov-action@v2
3328
with:
34-
env_vars: PYTHON,DJANGO,DJANGO_REST_FRAMEWORK
29+
env_vars: PYTHON
3530
check:
3631
name: Run check
3732
runs-on: ubuntu-latest

tox.ini

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,6 @@ envlist =
33
py{36,37,38,39}-django{22,30,31,32}-drf{312,master},
44
lint,docs
55

6-
[gh-actions]
7-
python =
8-
3.6: py36
9-
3.7: py37
10-
3.8: py38
11-
3.9: py39
12-
13-
[gh-actions:env]
14-
DJANGO =
15-
2.2: django22
16-
3.0: django30
17-
3.1: django31
18-
3.2: django32
19-
20-
DJANGO_REST_FRAMEWORK =
21-
3.12: drf312
22-
master: drfmaster
23-
246
[testenv]
257
deps =
268
django22: Django>=2.2,<2.3
@@ -61,3 +43,6 @@ deps =
6143
-rrequirements/requirements-documentation.txt
6244
commands =
6345
sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html
46+
47+
[testenv:py{36,37,38,39}-django{22,30,31,32}-drfmaster]
48+
ignore_outcome = true

0 commit comments

Comments
 (0)