Migrate CI to 4-job pipeline with SHA-pinned actions #4

Merged
jcabillot merged 3 commits from feat/gitea-actions-v2 into master 2026-06-09 08:34:19 -04:00
Showing only changes of commit 0a910ce903 - Show all commits
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
set -euo pipefail
IMAGE="$1"
FAILED=0
PASSED=0
assert_eq() {
local desc="$1" expected="$2" actual="$3"
if [ "$expected" = "$actual" ]; then
echo "PASS: $desc"
PASSED=$((PASSED + 1))
else
echo "FAIL: $desc (expected $expected, got $actual)"
FAILED=$((FAILED + 1))
fi
}
TMPDIR="$(mktemp -d)"
trap 'rm -rf "$TMPDIR"' EXIT
docker run --rm "$IMAGE" python -c "import troposphere; print(troposphere.__version__)" > "$TMPDIR/output" 2>&1 && RC=0 || RC=$?
assert_eq "import troposphere exits cleanly" "0" "$RC"
if [ -s "$TMPDIR/output" ]; then
echo "PASS: import produces version output"
PASSED=$((PASSED + 1))
else
echo "FAIL: import produces no output"
FAILED=$((FAILED + 1))
fi
echo ""
echo "$PASSED/$((PASSED + FAILED)) tests passed"
if [ "$FAILED" -gt 0 ]; then
exit 1
fi