workflows: improve speed of test_stages and test_assemblers
The other tests have concurrency issues at the moment. It seems in https://github.com/osbuild/osbuild/pull/1655 we lost parallel running. The issue seems to be that `env` does not actually define a shell environment but only a github environment. This sets commit sets the shell env explicitly to unbreak us again.
This commit is contained in:
parent
c5655c9006
commit
4f8ff6bc99
1 changed files with 28 additions and 14 deletions
42
.github/workflows/test.yml
vendored
42
.github/workflows/test.yml
vendored
|
|
@ -7,8 +7,9 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Using 4 workers is a bit arbitrary, "auto" is probably too aggressive.
|
# setting workers to 1 just to have the same syntax in all test
|
||||||
TEST_WORKERS: "-n 4"
|
# but to disable parallelism for the majority who have concurrency issues
|
||||||
|
TEST_WORKERS: "-n 1"
|
||||||
# Share the store between the workers speeds things up further
|
# Share the store between the workers speeds things up further
|
||||||
OSBUILD_TEST_STORE: /var/tmp/osbuild-test-store
|
OSBUILD_TEST_STORE: /var/tmp/osbuild-test-store
|
||||||
|
|
||||||
|
|
@ -20,19 +21,25 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
test:
|
test:
|
||||||
- "test.mod"
|
- "test.mod"
|
||||||
- "test.run.test_boot"
|
- "test.run.test_boot"
|
||||||
- "test.run.test_devices"
|
- "test.run.test_devices"
|
||||||
- "test.run.test_executable"
|
- "test.run.test_executable"
|
||||||
- "test.run.test_mount"
|
- "test.run.test_mount"
|
||||||
- "test.run.test_noop"
|
- "test.run.test_noop"
|
||||||
- "test.run.test_sources"
|
- "test.run.test_sources"
|
||||||
- "test.run.test_stages"
|
- "test.run.test_stages"
|
||||||
- "stages/test"
|
- "stages/test"
|
||||||
environment:
|
environment:
|
||||||
- "py36" # RH8
|
- "py36" # RH8
|
||||||
- "py39" # RH9
|
- "py39" # RH9
|
||||||
- "py312" # latest fedora
|
- "py312" # latest fedora
|
||||||
|
# special keyword "include"
|
||||||
|
include:
|
||||||
|
# this test _can_ run in parallel
|
||||||
|
# Using 4 workers is a bit arbitrary, "auto" is probably too aggressive.
|
||||||
|
- test: "test.run.test_stages"
|
||||||
|
env_TEST_WORKERS: "-n 4"
|
||||||
steps:
|
steps:
|
||||||
- name: "Clone Repository"
|
- name: "Clone Repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
@ -47,6 +54,8 @@ jobs:
|
||||||
sed -i 's/overlay/vfs/g' /usr/share/containers/storage.conf # default system config
|
sed -i 's/overlay/vfs/g' /usr/share/containers/storage.conf # default system config
|
||||||
sed -i 's/overlay/vfs/g' /etc/containers/storage.conf || true # potential overrides
|
sed -i 's/overlay/vfs/g' /etc/containers/storage.conf || true # potential overrides
|
||||||
TEST_CATEGORY="${{ matrix.test }}" \
|
TEST_CATEGORY="${{ matrix.test }}" \
|
||||||
|
TEST_WORKERS="${{ matrix.env_TEST_WORKERS || env.TEST_WORKERS }}" \
|
||||||
|
OSBUILD_TEST_STORE="${{ env.OSBUILD_TEST_STORE }}" \
|
||||||
tox -e "${{ matrix.environment }}"
|
tox -e "${{ matrix.environment }}"
|
||||||
|
|
||||||
v1_manifests:
|
v1_manifests:
|
||||||
|
|
@ -57,8 +66,13 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: "Run"
|
- name: "Run"
|
||||||
uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b
|
uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b
|
||||||
|
env:
|
||||||
|
# Using 4 workers is a bit arbitrary, "auto" is probably too aggressive.
|
||||||
|
TEST_WORKERS: "-n 4"
|
||||||
with:
|
with:
|
||||||
image: ghcr.io/osbuild/osbuild-ci:latest-202308241910
|
image: ghcr.io/osbuild/osbuild-ci:latest-202308241910
|
||||||
run: |
|
run: |
|
||||||
TEST_CATEGORY="test.run.test_assemblers" \
|
TEST_CATEGORY="test.run.test_assemblers" \
|
||||||
|
TEST_WORKERS="${{ env.TEST_WORKERS }}" \
|
||||||
|
OSBUILD_TEST_STORE="${{ env.OSBUILD_TEST_STORE }}" \
|
||||||
tox -e "py36"
|
tox -e "py36"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue