Skip to content

Commit 3e7710d

Browse files
authored
Merge pull request #115 from javaevolved/copilot/automate-proof-script
Add GitHub Actions workflow to run all proof scripts
2 parents 3f96dec + a2f03f6 commit 3e7710d

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/proof.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Proof Scripts
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'proof/**'
8+
pull_request:
9+
paths:
10+
- 'proof/**'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
proof:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- uses: actions/setup-java@v5
23+
with:
24+
distribution: 'temurin'
25+
java-version: '25'
26+
27+
- uses: jbangdev/setup-jbang@main
28+
29+
- name: Run all proof scripts
30+
shell: bash
31+
run: |
32+
passed=0
33+
failed=0
34+
failures=()
35+
36+
while IFS= read -r -d '' script; do
37+
name="${script#proof/}"
38+
if jbang "$script" > /dev/null 2>&1; then
39+
echo "✅ $name"
40+
((passed++))
41+
else
42+
echo "❌ $name"
43+
failures+=("$name")
44+
((failed++))
45+
fi
46+
done < <(find proof -name '*.java' -print0 | sort -z)
47+
48+
echo ""
49+
echo "Results: $passed passed, $failed failed out of $((passed + failed)) scripts"
50+
51+
if [ ${#failures[@]} -gt 0 ]; then
52+
echo ""
53+
echo "Failed scripts:"
54+
for f in "${failures[@]}"; do
55+
echo " - $f"
56+
done
57+
exit 1
58+
fi

0 commit comments

Comments
 (0)