Skip to content

Commit

Permalink
tests: run multiple pytests in parallel in the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Nov 7, 2023
1 parent cd1c5f0 commit 2919f38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ jobs:
with:
image: ghcr.io/osbuild/osbuild-ci:latest-202308241910
run: |
TEST_CATEGORY="${{ matrix.test }}" \
# XXX: or use "auto" here?
TEST_CATEGORY="${{ matrix.test }}" TEST_WORKERS="-n 4" \
tox -e "${{ matrix.environment }}"
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ labels =
description = "run osbuild unit tests"
deps =
pytest
pytest-xdist
jsonschema
mako
iniparse
Expand All @@ -26,7 +27,7 @@ passenv =
TEST_CATEGORY

commands =
bash -c 'python -m pytest --pyargs --rootdir=. {env:TEST_CATEGORY}'
bash -c 'python -m pytest --pyargs --rootdir=. {env:TEST_CATEGORY} {env:TEST_WORKERS}'

allowlist_externals =
bash
Expand Down

0 comments on commit 2919f38

Please sign in to comment.