Skip to content

Commit e71787f

Browse files
committed
ci: Unify test-integration jobs into single matrix
Consolidate test-integration and test-integration-cfs into a single job using a unified matrix (test_os × variant) matching the structure of build-and-publish.yml. This eliminates code duplication and simplifies maintenance. Updated required-checks sentinel to depend only on the unified job. Assisted-by: Claude Code (Sonnet 4.5) Signed-off-by: Colin Walters <[email protected]>
1 parent 094c39d commit e71787f

File tree

1 file changed

+19
-60
lines changed

1 file changed

+19
-60
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -120,59 +120,12 @@ jobs:
120120
strategy:
121121
fail-fast: false
122122
matrix:
123-
test_os: [fedora-42, fedora-43, centos-9, centos-10]
124-
125-
runs-on: ubuntu-24.04
126-
127-
steps:
128-
- uses: actions/checkout@v6
129-
- name: Bootc Ubuntu Setup
130-
uses: ./.github/actions/bootc-ubuntu-setup
131-
with:
132-
libvirt: true
133-
- name: Install tmt
134-
run: pip install --user "tmt[provision-virtual]"
135-
136-
- name: Setup env
137-
run: |
138-
BASE=$(just pullspec-for-os base ${{ matrix.test_os }})
139-
echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
140-
141-
- name: Build container
142-
run: |
143-
just build-integration-test-image
144-
# Extra cross-check (duplicating the integration test) that we're using the right base
145-
used_vid=$(podman run --rm localhost/bootc-integration bash -c '. /usr/lib/os-release && echo ${ID}-${VERSION_ID}')
146-
test ${{ matrix.test_os }} = "${used_vid}"
147-
148-
- name: Unit and container integration tests
149-
run: just test-container
150-
151-
- name: Run all TMT tests
152-
run: just test-tmt
153-
154-
- name: Archive TMT logs
155-
if: always()
156-
uses: actions/upload-artifact@v5
157-
with:
158-
name: tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-ostree-${{ env.ARCH }}
159-
path: /var/tmp/tmt
160-
161-
# This variant does composefs testing
162-
test-integration-cfs:
163-
continue-on-error: ${{ matrix.experimental }}
164-
strategy:
165-
fail-fast: false
166-
matrix:
167-
# OS via Justfile variables too
168-
test_os: [fedora-42, fedora-43, fedora-44, centos-10]
169-
variant: [composefs-sealeduki-sdboot]
170-
experimental: [false]
171-
# For issue https://github.com/bootc-dev/bootc/issues/1812
172-
include:
123+
test_os: [fedora-42, fedora-43, fedora-44, centos-9, centos-10]
124+
variant: [ostree, composefs-sealeduki-sdboot]
125+
exclude:
126+
# centos-9 UKI is experimental/broken (https://github.com/bootc-dev/bootc/issues/1812)
173127
- test_os: centos-9
174128
variant: composefs-sealeduki-sdboot
175-
experimental: true
176129

177130
runs-on: ubuntu-24.04
178131

@@ -188,10 +141,13 @@ jobs:
188141
- name: Setup env
189142
run: |
190143
BASE=$(just pullspec-for-os base ${{ matrix.test_os }})
191-
BUILDROOTBASE=$(just pullspec-for-os buildroot-base ${{ matrix.test_os }})
192144
echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
193-
echo "BOOTC_buildroot_base=${BUILDROOTBASE}" >> $GITHUB_ENV
194-
echo "BOOTC_variant="${{ matrix.variant }} >> $GITHUB_ENV
145+
echo "BOOTC_variant=${{ matrix.variant }}" >> $GITHUB_ENV
146+
147+
if [ "${{ matrix.variant }}" = "composefs-sealeduki-sdboot" ]; then
148+
BUILDROOTBASE=$(just pullspec-for-os buildroot-base ${{ matrix.test_os }})
149+
echo "BOOTC_buildroot_base=${BUILDROOTBASE}" >> $GITHUB_ENV
150+
fi
195151
196152
- name: Build container
197153
run: |
@@ -204,25 +160,28 @@ jobs:
204160
run: just test-container
205161

206162
- name: Run TMT tests
207-
# Note that this one only runs a subset of tests right now
208-
run: just test-composefs
163+
run: |
164+
if [ "${{ matrix.variant }}" = "composefs-sealeduki-sdboot" ]; then
165+
just test-composefs
166+
else
167+
just test-tmt
168+
fi
209169
210170
- name: Archive TMT logs
211171
if: always()
212172
uses: actions/upload-artifact@v5
213173
with:
214-
name: tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-cfs-${{ env.ARCH }}
174+
name: tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ matrix.variant }}-${{ env.ARCH }}
215175
path: /var/tmp/tmt
216176

217177
# Sentinel job for required checks - configure this job name in repository settings
218178
required-checks:
219179
if: always()
220-
needs: [cargo-deny, validate, test-integration, test-integration-cfs]
180+
needs: [cargo-deny, validate, test-integration]
221181
runs-on: ubuntu-latest
222182
steps:
223183
- run: exit 1
224184
if: >-
225185
needs.cargo-deny.result != 'success' ||
226186
needs.validate.result != 'success' ||
227-
needs.test-integration.result != 'success' ||
228-
needs.test-integration-cfs.result != 'success'
187+
needs.test-integration.result != 'success'

0 commit comments

Comments
 (0)