Skip to content

Commit 65fc6de

Browse files
committed
Split up job matrix and parallelize each invocation
1 parent bc9c71e commit 65fc6de

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ permissions:
1212
contents: write
1313

1414
jobs:
15-
compare-php:
15+
tests:
16+
strategy:
17+
matrix:
18+
php: ["not php_api", "php_api"]
19+
mutations: ["not mut", "mut"]
1620
runs-on: ubuntu-latest
1721
steps:
1822
- uses: actions/checkout@v6
@@ -22,21 +26,7 @@ jobs:
2226

2327
# https://github.com/docker/compose/issues/10596
2428
- run: docker compose --profile "python" --profile "php" up --detach --wait --remove-orphans || exit $(docker compose ps -q | xargs docker inspect -f '{{.State.ExitCode}}' | grep -v '^0' | wc -l)
25-
- run: docker exec openml-python-rest-api coverage run -m pytest -v -m "php_api"
26-
- run: docker exec openml-python-rest-api coverage xml
27-
- name: Upload results to Codecov
28-
uses: codecov/codecov-action@v4
29-
with:
30-
token: ${{ secrets.CODECOV_TOKEN }}
31-
python:
32-
runs-on: ubuntu-latest
33-
steps:
34-
- uses: actions/checkout@v6
35-
- uses: actions/setup-python@v6
36-
with:
37-
python-version: 3.x
38-
- run: docker compose --profile "python" up --detach --wait --remove-orphans || exit $(docker compose ps -q | xargs docker inspect -f '{{.State.ExitCode}}' | grep -v '^0' | wc -l)
39-
- run: docker exec openml-python-rest-api coverage run -m pytest -v -m "not php_api"
29+
- run: docker exec openml-python-rest-api coverage run -m pytest -n auto -v -m "${{ matrix.php }} and ${{ matrix.mutations }}"
4030
- run: docker exec openml-python-rest-api coverage xml
4131
- name: Upload results to Codecov
4232
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)