Skip to content

Commit 427f571

Browse files
committed
Use GHA matrix strategy to test Debian OSes
1 parent 6efc06d commit 427f571

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed

.github/workflows/release-build-sign-upload.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,14 @@ jobs:
910910
needs:
911911
- setup
912912
- build-linux
913+
strategy:
914+
matrix:
915+
image:
916+
- debian:11
917+
- debian:12
918+
- ubuntu:20.04
919+
- ubuntu:22.04
920+
- ubuntu
913921
runs-on: ubuntu-latest
914922
steps:
915923

@@ -918,21 +926,20 @@ jobs:
918926
with:
919927
name: cf-cli-linux-deb-packages
920928

921-
- name: Display structure of downloaded files and test compression
929+
- name: Display structure and verify
930+
env:
931+
IMAGE: ${{ matrix.image }}
922932
run: |
923-
ls -R
924-
925-
for i in debian:11 debian:12 ubuntu:20.04 ubuntu:22.04 ubuntu; do docker run \
933+
docker run \
926934
--interactive \
927935
--rm \
928936
-v .:/workspace \
929-
${i:?} <<EOC
930-
printf "${i:?} -> "
937+
${IMAGE} <<EOC
938+
printf "${IMAGE} -> "
931939
grep PRETTY_NAME /etc/os-release | cut -d= -f2-
932940
cd workspace
933941
ls *.deb | xargs -n1 dpkg --info
934942
EOC
935-
done
936943
937944
test-macos:
938945
name: Test macOS Artifacts

.github/workflows/release-update-repos.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ jobs:
305305
306306
test-deb:
307307
name: Test Debian Repository
308+
strategy:
309+
matrix:
310+
image:
311+
- debian:11
312+
- debian:12
313+
- ubuntu:20.04
314+
- ubuntu:22.04
315+
- ubuntu
308316
runs-on: ubuntu-latest
309317
needs:
310318
- setup
@@ -316,17 +324,23 @@ jobs:
316324
steps:
317325

318326
- name: Install CF CLI via apt
327+
env:
328+
IMAGE: ${{ matrix.image }}
319329
run: |
330+
docker run \
331+
--interactive \
332+
--rm \
333+
${IMAGE} <<EOC
320334
set -o pipefail -e
321335
322-
sudo apt update
323-
sudo apt install -y wget gnupg
336+
apt update
337+
apt install -y wget gnupg
324338
325-
wget -q -O - ${CLAW_URL}/debian/cli.cloudfoundry.org.key | sudo apt-key add -
326-
echo "deb ${CLAW_URL}/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
339+
wget -q -O - ${CLAW_URL}/debian/cli.cloudfoundry.org.key | apt-key add -
340+
echo "deb ${CLAW_URL}/debian stable main" | tee /etc/apt/sources.list.d/cloudfoundry-cli.list
327341
328-
sudo apt update
329-
sudo apt install -y cf${VERSION_MAJOR}-cli
342+
apt update
343+
apt install -y cf${VERSION_MAJOR}-cli
330344
331345
which cf
332346
@@ -336,6 +350,7 @@ jobs:
336350
cf${VERSION_MAJOR} -v
337351
338352
cf -v | grep "${VERSION_BUILD}"
353+
EOC
339354
340355
update-rpm:
341356
name: Update RPM Repository

0 commit comments

Comments
 (0)