Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ jobs:
path: target/packages/*.rpm
retention-days: 1

# Unit tests don't depend on the variant/filesystem/bootloader/boot_type/seal_state
# axes used by the test-integration matrix below, so we run them once per OS here
# (reusing the BuildKit cache already warmed by `just check-buildsys` above) instead
# of once per matrix leg.
- name: Unit tests
run: just unit-tests

# Build bootc from source into a container image FROM each specified base `test_os`
# running unit and integration tests (using TMT, leveraging the support for nested virtualization
# in the GHA runners)
Expand Down Expand Up @@ -310,8 +317,8 @@ jobs:
used_vid=$(podman run --rm localhost/bootc bash -c '. /usr/lib/os-release && echo ${ID}-${VERSION_ID}')
test ${{ matrix.test_os }} = "${used_vid}"

- name: Unit and container integration tests
run: BOOTC_SKIP_PACKAGE=1 just test-container
- name: Container integration tests
run: BOOTC_SKIP_PACKAGE=1 just test-container-integration

- name: Validate composefs digest (UKI only)
if: matrix.boot_type == 'uki'
Expand Down
17 changes: 15 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,25 @@ test-tmt *ARGS: build
@just _build-upgrade-image
@just test-tmt-nobuild {{ARGS}}

# Run containerized unit and integration tests
# Split out from `test-container` because, unlike the container integration tests,
# unit tests don't depend on variant/filesystem/bootloader/boot_type/seal_state, so
# CI runs this once per OS (in the `package` job) instead of once per test-integration
# matrix leg.
# Run the unit test suite in a container (needs e.g. ostree/composefs shared libs)
[group('core')]
test-container: build build-units
unit-tests: build-units
podman run --rm --read-only localhost/bootc-units /usr/bin/bootc-units

# Used by CI's test-integration matrix, where unit tests already ran once per OS.
# Run the container integration tests only (no unit tests)
[group('core')]
test-container-integration: build
podman run --rm --env=BOOTC_variant={{variant}} --env=BOOTC_base={{base}} --env=BOOTC_boot_type={{boot_type}} --mount=type=image,source={{base_img}},target=/run/target {{base_img}} bootc-integration-tests container

# Run containerized unit and integration tests
[group('core')]
test-container: unit-tests test-container-integration

[group('core')]
test-composefs bootloader filesystem boot_type seal_state *ARGS:
@if [ "{{seal_state}}" = "sealed" ] && [ "{{filesystem}}" = "xfs" ]; then \
Expand Down
Loading