Tests: Run CI tests in parallel

This commit is contained in:
oakkitten 2022-06-07 23:41:47 +01:00
parent 863cef5e64
commit b01dd47dec
2 changed files with 53 additions and 32 deletions

View File

@ -1,32 +0,0 @@
name: Tests
on: [push, pull_request, workflow_dispatch]
jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y pyqt5-dev-tools xvfb
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install tox
run: pip install tox
- name: Checkout repository
uses: actions/checkout@v2
- name: Run tests
run: tox -- --forked --verbose

53
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,53 @@
name: Tests
on: [push, pull_request, workflow_dispatch]
jobs:
run-tests:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Anki 2.1.45
python: 3.8
environment: py38-anki2.1.45
- name: Anki 2.1.46
python: 3.8
environment: py38-anki2.1.46
- name: Anki 2.1.47
python: 3.8
environment: py38-anki2.1.47
- name: Anki 2.1.48
python: 3.8
environment: py38-anki2.1.48
- name: Anki 2.1.49
python: 3.8
environment: py38-anki2.1.49
- name: Anki 2.1.50 (Qt5)
python: 3.9
environment: py39-anki2.1.50-qt5
- name: Anki 2.1.50 (Qt6)
python: 3.9
environment: py39-anki2.1.50-qt6
fail-fast: false
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y pyqt5-dev-tools xvfb jq
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: pip install tox
- name: Checkout repository
uses: actions/checkout@v2
- name: Run tests
run: tox -vvve ${{ matrix.environment }} -- --forked --verbose