There were special cases in the workflow for only running specific tests in parallel. However how that the test_assemblers parallel runs are fixed [0] there is really no need for special cases anymore and we can just run them all in parallel. [0] https://github.com/osbuild/osbuild/pull/1641
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
name: Tests
|
|
|
|
on: [pull_request, push]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# Using 4 workers is a bit arbitrary, "auto" is probably too aggressive.
|
|
TEST_WORKERS: "-n 4"
|
|
# Share the store between the workers speeds things up further
|
|
OSBUILD_TEST_STORE: /var/tmp/osbuild-test-store
|
|
|
|
jobs:
|
|
test_suite:
|
|
name: "Unittest"
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
test:
|
|
- "test.mod"
|
|
- "test.run.test_boot"
|
|
- "test.run.test_devices"
|
|
- "test.run.test_executable"
|
|
- "test.run.test_mount"
|
|
- "test.run.test_noop"
|
|
- "test.run.test_sources"
|
|
- "test.run.test_stages"
|
|
- "stages/test"
|
|
environment:
|
|
- "py36" # RH8
|
|
- "py39" # RH9
|
|
- "py312" # latest fedora
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v3
|
|
- name: "Run"
|
|
uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b
|
|
with:
|
|
image: ghcr.io/osbuild/osbuild-ci:latest-202308241910
|
|
run: |
|
|
# Hacky replacement of container storage driver:
|
|
# The default overlayfs doesn't work in the runner, so let's change
|
|
# it to vfs for the local storage skopeo stage test.
|
|
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
|
|
TEST_CATEGORY="${{ matrix.test }}" \
|
|
tox -e "${{ matrix.environment }}"
|
|
|
|
v1_manifests:
|
|
name: "Assembler test (legacy)"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v4
|
|
- name: "Run"
|
|
uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b
|
|
with:
|
|
image: ghcr.io/osbuild/osbuild-ci:latest-202308241910
|
|
run: |
|
|
TEST_CATEGORY="test.run.test_assemblers" \
|
|
tox -e "py36"
|