With pytest 8.0.0 the `-k` option seem to have changed it's behavior. Drop `-k` therefore. Tests started to fail recently and it looks like this is because pytest 8.0.0 changes the semantic of the `-k` option. We used to pass `-k stages/test` but that seems to no longer work. So pin pytest to the last good version until this is better understood.
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: Tests
|
|
|
|
on: [pull_request, push]
|
|
|
|
jobs:
|
|
test_suite:
|
|
name: "Unittest"
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
test:
|
|
- "test.mod"
|
|
- "test.run.test_assemblers"
|
|
- "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"
|
|
- "py39"
|
|
- "py311"
|
|
- "py312"
|
|
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: |
|
|
# Note that only "test.run.test_stages" runs in parallel because
|
|
# the other tests are not sufficiently isolated and will cause
|
|
# random failures. But test_stages is the long running one with
|
|
# almost 2h.
|
|
if [ "${{ matrix.test }}" = "test.run.test_stages" ]; then
|
|
# Using 4 workers is a bit arbitrary, "auto" is probably too
|
|
# aggressive.
|
|
export TEST_WORKERS="-n 4"
|
|
# Share the store between the workers speeds things up further
|
|
export OSBUILD_TEST_STORE=/var/tmp/osbuild-test-store
|
|
fi
|
|
TEST_CATEGORY="${{ matrix.test }}" \
|
|
tox -e "${{ matrix.environment }}"
|