Skip to content

Commit f052fd6

Browse files
nadilasclaude
andcommitted
feat: add workflow hardening patch for CI pipeline
Patch includes: workflow_dispatch trigger, Postgres service for T3, wasm-tools caching in T4/T5/T6, and nightly schedule annotations. Apply with: git apply scripts/integration-tests-workflow.patch Note: GitHub App tokens cannot push workflow file changes directly. The patch must be applied by a maintainer with workflows permission. Closes #93 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e799537 commit f052fd6

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
2+
index ea7f7ed..fb48499 100644
3+
--- a/.github/workflows/integration-tests.yml
4+
+++ b/.github/workflows/integration-tests.yml
5+
@@ -8,6 +8,7 @@ on:
6+
schedule:
7+
# Nightly at 3am UTC — catches flaky regressions on main
8+
- cron: '0 3 * * *'
9+
+ workflow_dispatch:
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
@@ -148,6 +149,22 @@ jobs:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 15
16+
17+
+ services:
18+
+ postgres:
19+
+ image: postgres:16
20+
+ env:
21+
+ POSTGRES_USER: testuser
22+
+ POSTGRES_PASSWORD: testpass
23+
+ POSTGRES_DB: testdb
24+
+ ports:
25+
+ - 5432:5432
26+
+ options: >-
27+
+ --health-cmd "pg_isready -U testuser"
28+
+ --health-interval 5s
29+
+ --health-timeout 5s
30+
+ --health-retries 5
31+
+ --tmpfs /var/lib/postgresql/data
32+
+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
@@ -184,7 +201,15 @@ jobs:
37+
38+
- uses: dtolnay/rust-toolchain@stable
39+
40+
+ - name: Cache wasm-tools
41+
+ id: wasm-tools-cache
42+
+ uses: actions/cache@v4
43+
+ with:
44+
+ path: ~/.cargo/bin/wasm-tools
45+
+ key: wasm-tools-${{ runner.os }}-v1
46+
+
47+
- name: Install wasm-tools
48+
+ if: steps.wasm-tools-cache.outputs.cache-hit != 'true'
49+
run: cargo install wasm-tools
50+
51+
- name: Cache ComponentizeJS
52+
@@ -230,7 +255,15 @@ jobs:
53+
54+
- uses: dtolnay/rust-toolchain@stable
55+
56+
+ - name: Cache wasm-tools
57+
+ id: wasm-tools-cache
58+
+ uses: actions/cache@v4
59+
+ with:
60+
+ path: ~/.cargo/bin/wasm-tools
61+
+ key: wasm-tools-${{ runner.os }}-v1
62+
+
63+
- name: Install wasm-tools
64+
+ if: steps.wasm-tools-cache.outputs.cache-hit != 'true'
65+
run: cargo install wasm-tools
66+
67+
- name: Cache ComponentizeJS
68+
@@ -315,7 +348,15 @@ jobs:
69+
with:
70+
version: "v41.0.0"
71+
72+
+ - name: Cache wasm-tools
73+
+ id: wasm-tools-cache
74+
+ uses: actions/cache@v4
75+
+ with:
76+
+ path: ~/.cargo/bin/wasm-tools
77+
+ key: wasm-tools-${{ runner.os }}-v1
78+
+
79+
- name: Install wasm-tools
80+
+ if: steps.wasm-tools-cache.outputs.cache-hit != 'true'
81+
run: cargo install wasm-tools
82+
83+
- name: Cache ComponentizeJS
84+
@@ -377,6 +418,14 @@ jobs:
85+
pattern: test-results-*
86+
merge-multiple: true
87+
88+
+ - name: Annotate trigger context
89+
+ run: |
90+
+ if [ "${{ github.event_name }}" = "schedule" ]; then
91+
+ echo "::notice::This run was triggered by the nightly schedule (cron). Failures may indicate flaky regressions."
92+
+ echo "> **Nightly scheduled run** — failures here may indicate flaky regressions on main." >> "$GITHUB_STEP_SUMMARY"
93+
+ echo "" >> "$GITHUB_STEP_SUMMARY"
94+
+ fi
95+
+
96+
- name: Summary
97+
run: |
98+
echo "## Integration Test Results" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)