Skip to content

Commit fa5c50d

Browse files
committed
Run the apt-repo shell tests in CI
The tests SKIP when their tooling is missing so they stay usable on a bare dev box; APT_REPO_TESTS_STRICT=1 turns that SKIP into a failure in CI, so a missing runner package can't make the suite pass vacuously.
1 parent 306fea2 commit fa5c50d

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test the self-hosted APT repo tooling
2+
on:
3+
pull_request:
4+
paths:
5+
- "platforms/apt-repo/**"
6+
- "platforms/debian-server/debian/postinst"
7+
- "platforms/debian-server/debian/install"
8+
- "platforms/debian-server/Makefile"
9+
- ".github/workflows/platform-apt-repo-test.yml"
10+
push:
11+
branches:
12+
- develop
13+
paths:
14+
- "platforms/apt-repo/**"
15+
- ".github/workflows/platform-apt-repo-test.yml"
16+
permissions:
17+
contents: read
18+
jobs:
19+
test:
20+
name: Run the apt-repo shell tests
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v7.0.0
24+
- name: Install repo tooling
25+
# docker is preinstalled; the container-backed tests use it. These are
26+
# what the rest need, so APT_REPO_TESTS_STRICT below — which turns a
27+
# missing-tool SKIP into a hard failure — leaves nothing to skip.
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y --no-install-recommends reprepro gnupg dpkg-dev rsync
31+
- name: Run the apt-repo tests
32+
env:
33+
APT_REPO_TESTS_STRICT: "1"
34+
run: |
35+
for t in platforms/apt-repo/tests/*.sh; do
36+
# Executable => a test; lib.sh is sourced, not run. Each test picks
37+
# its own interpreter via its shebang.
38+
[ -x "$t" ] || continue
39+
echo "::group::$t"
40+
"$t"
41+
echo "::endgroup::"
42+
done

0 commit comments

Comments
 (0)