Skip to content

Commit e67969d

Browse files
committed
Run tox tests in parallel
1 parent d9490a0 commit e67969d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: python -Im flit build --format wheel
6161

6262
- name: 🧪 Run tox targets for Python ${{ matrix.python-version }}
63-
run: tox --installpkg ./dist/*.whl
63+
run: tox --installpkg ./dist/*.whl -- -v 1
6464

6565
- name: ⬆️ Upload coverage data
6666
uses: actions/upload-artifact@v3
@@ -90,6 +90,7 @@ jobs:
9090

9191
- name: + Generate report
9292
run: |
93+
python -Im coverage combine
9394
python -Im coverage html --skip-covered --skip-empty
9495
python -Im coverage report
9596
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ deps =
3232
coverage[toml]>=7.0,<8.0
3333
factory-boy==3.2.1
3434
wagtail-factories>=4.1.0
35-
django-cors-headers==3.4.0
35+
django-cors-headers>=4.2.0
3636
wagtailmedia>=0.13
3737
dj-database-url==2.1.0
3838
psycopg2>=2.9.5,<3.0.0
39+
tblib==1.7.0
3940

4041
django32: Django>=3.2,<3.3
4142
django41: Django>=4.1,<4.2
@@ -48,7 +49,7 @@ deps =
4849
install_command = python -Im pip install -U {opts} {packages}
4950

5051
commands =
51-
python -m coverage run manage.py test {posargs: -v 2}
52+
python -m coverage run --parallel-mode manage.py test --parallel {posargs: -v 2}
5253

5354
[testenv:coverage-report]
5455
; a bit of a hack - we keep deps to a minimum, and move coverage data to the tox root for easier excludes
@@ -60,6 +61,7 @@ pre_commands =
6061
mv {tox_root}/tests/.coverage* {tox_root}/
6162

6263
commands =
64+
python -Im coverage combine
6365
python -Im coverage report -m
6466

6567
[testenv:wagtailmain]

0 commit comments

Comments
 (0)