tests: run the test_stages category in parallel

Run the `test_stages` test in parallel in the github runner. This
test currently takes about 1:30h to 2:30h and running it in parallel
will give us big wins in terms of test time. The time is observed
to go down to 0:30h to 1h.

Note that the other tests are not run in parallel. The reason is
that they fail randomly, it looks like insufficient isolation
between them. Some are easy to fix, e.g.:
721521220b
but it's probably not worth it as the other tests run a lot faster.
This commit is contained in:
Michael Vogt 2023-11-07 11:43:26 +01:00 committed by Simon de Vlieger
parent 78238ba0a6
commit 0edbe0cf96
2 changed files with 13 additions and 1 deletions

View file

@ -13,6 +13,7 @@ labels =
description = "run osbuild unit tests"
deps =
pytest
pytest-xdist
jsonschema
mako
iniparse
@ -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