Skip to content

Commit 589af14

Browse files
authored
Merge pull request #3858 from mulkieran/project_issue_755
Try alternative branches for tests that use non-stratisd repos
2 parents 06a7223 + 26dff9b commit 589af14

1 file changed

Lines changed: 66 additions & 8 deletions

File tree

.github/workflows/main.yml

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ jobs:
8181
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
8282
options: --privileged --userns=host --ipc=host -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro -v /usr/share/dbus-1:/usr/share/dbus-1
8383
steps:
84+
- name: Install git for checkout action
85+
run: dnf install -y git
8486
- uses: actions/checkout@v4
8587
with:
8688
path: stratisd
@@ -95,7 +97,6 @@ jobs:
9597
dbus-devel
9698
device-mapper-devel
9799
libblkid-devel
98-
git
99100
glibc-static
100101
make
101102
ncurses
@@ -121,7 +122,35 @@ jobs:
121122
- name: Workaround for dbus inotify
122123
run: cp stratisd.conf /usr/share/dbus-1/system.d
123124
working-directory: stratisd
124-
- name: Check out stratis-cli
125+
- name: Check out jbaublitz/stratis-cli
126+
id: jbaublitz
127+
continue-on-error: true
128+
uses: actions/checkout@v4
129+
with:
130+
repository: jbaublitz/stratis-cli
131+
path: jbaublitz
132+
ref: ${{ github.head_ref }}
133+
- name: Check out mulkieran/stratis-cli
134+
id: mulkieran
135+
continue-on-error: true
136+
uses: actions/checkout@v4
137+
with:
138+
repository: mulkieran/stratis-cli
139+
path: mulkieran
140+
ref: ${{ github.head_ref }}
141+
- name: Check if both checkouts succeeded
142+
if: steps.jbaublitz.outcome == 'success' && steps.mulkieran.outcome == 'success'
143+
run: |
144+
echo "Branch conflict!"
145+
exit 1
146+
- name: Conditionally make jbaublitz checkout branch the chosen one
147+
if: steps.jbaublitz.outcome == 'success'
148+
run: mv jbaublitz stratis-cli
149+
- name: Conditionally make mulkieran checkout branch the chosen one
150+
if: steps.mulkieran.outcome == 'success'
151+
run: mv mulkieran stratis-cli
152+
- name: Check out stratis-cli if no alternative branch was checked out
153+
if: steps.mulkieran.outcome == 'failure' && steps.jbaublitz.outcome == 'failure'
125154
uses: actions/checkout@v4
126155
with:
127156
repository: stratis-storage/stratis-cli
@@ -261,11 +290,10 @@ jobs:
261290
matrix:
262291
include:
263292
- rev: master
264-
options: --post-test-check=verify-filesystem-symlinks --post-test-check=verify-pool-metadata --highest-revision-number=8
265-
- rev: v3.6.2
266-
options: --highest-revision-number=6
267293
runs-on: ubuntu-24.04
268294
steps:
295+
- name: Install git for checkout action
296+
run: DEBIAN_FRONTEND=noninteractive sudo apt-get install -y git
269297
- uses: actions/checkout@v4
270298
with:
271299
path: stratisd
@@ -310,12 +338,40 @@ jobs:
310338
working-directory: stratisd
311339
- name: Reload udev
312340
run: sudo udevadm control --reload
313-
- name: Clone testing repo
341+
- name: Check out jbaublitz/testing
342+
id: jbaublitz
343+
continue-on-error: true
344+
uses: actions/checkout@v4
345+
with:
346+
repository: jbaublitz/testing
347+
path: jbaublitz
348+
ref: ${{ github.head_ref }}
349+
- name: Check out mulkieran/testing
350+
id: mulkieran
351+
continue-on-error: true
352+
uses: actions/checkout@v4
353+
with:
354+
repository: mulkieran/testing
355+
path: mulkieran
356+
ref: ${{ github.head_ref }}
357+
- name: Check if both checkouts succeeded
358+
if: steps.jbaublitz.outcome == 'success' && steps.mulkieran.outcome == 'success'
359+
run: |
360+
echo "Branch conflict!"
361+
exit 1
362+
- name: Conditionally make jbaublitz checkout branch the chosen one
363+
if: steps.jbaublitz.outcome == 'success'
364+
run: mv jbaublitz testing
365+
- name: Conditionally make mulkieran checkout branch the chosen one
366+
if: steps.mulkieran.outcome == 'success'
367+
run: mv mulkieran testing
368+
- name: Check out testing if no alternative branch was checked out
369+
if: steps.mulkieran.outcome == 'failure' && steps.jbaublitz.outcome == 'failure'
314370
uses: actions/checkout@v4
315371
with:
316372
repository: stratis-storage/testing
317373
path: testing
318-
ref: ${{ matrix.rev }}
374+
ref: master
319375
- name: Run stratisd_cert.py
320376
run: >
321377
sudo
@@ -325,5 +381,7 @@ jobs:
325381
--post-test-check=monitor-dbus
326382
--post-test-check=verify-sysfs
327383
--post-test-check=verify-private-symlinks
328-
${{ matrix.options }}
384+
--post-test-check=verify-filesystem-symlinks
385+
--post-test-check=verify-pool-metadata
386+
--highest-revision-number=8
329387
working-directory: testing

0 commit comments

Comments
 (0)