Skip to content

Commit

Permalink
ci: run more tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
jerivas committed Nov 19, 2021
1 parent f9991d5 commit 042661b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 20 deletions.
65 changes: 55 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,68 @@ on:

jobs:

# Test
# Test all supported Python & Django versions
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [3.6, 3.7, 3.8, 3.9]
include:
# Django 2.2
- tox-env: "py36-dj22"
python-version: "3.6"
- tox-env: "py37-dj22"
python-version: "3.7"
- tox-env: "py38-dj22"
python-version: "3.8"
- tox-env: "py39-dj22"
python-version: "3.9"
# Django 3.0
- tox-env: "py36-dj30"
python-version: "3.6"
- tox-env: "py37-dj30"
python-version: "3.7"
- tox-env: "py38-dj30"
python-version: "3.8"
- tox-env: "py39-dj30"
python-version: "3.9"
# Django 3.1
- tox-env: "py36-dj31"
python-version: "3.6"
- tox-env: "py37-dj31"
python-version: "3.7"
- tox-env: "py38-dj31"
python-version: "3.8"
- tox-env: "py39-dj31"
python-version: "3.9"
# Django 3.2
- tox-env: "py36-dj32"
python-version: "3.6"
- tox-env: "py37-dj32"
python-version: "3.7"
- tox-env: "py38-dj32"
python-version: "3.8"
- tox-env: "py39-dj32"
python-version: "3.9"
- tox-env: "py310-dj32"
python-version: "3.10"
# Django 4.0
# - tox-env: "py38-dj40"
# python-version: "3.8"
# - tox-env: "py39-dj40"
# python-version: "3.9"
# - tox-env: "py310-dj40"
# python-version: "3.10"

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install tox tox-gh-actions -U pip
run: pip install -U pip tox
- name: Run tests
run: |
tox --skip-missing-interpreters=false
run: tox -e ${{ matrix.tox-env }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
with:
Expand All @@ -34,7 +79,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -48,12 +93,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
semantic_version: 18
extra_plugins: |
@semantic-release/exec@5
env:
Expand Down
11 changes: 1 addition & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[tox]
skip_missing_interpreters = true
envlist =
py{36,37,38,39}-dj{22,30,31,32}
py{36,37,38,39,310}-dj{22,30,31,32}
package
lint

Expand Down Expand Up @@ -70,11 +69,3 @@ exclude =
*.egg-info
build
dist

[gh-actions]
# Connect GitHub Action matrices with tox envs
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39

0 comments on commit 042661b

Please sign in to comment.