Skip to content

Commit 5444c40

Browse files
committed
ci: apply workflow improvements from PR #143
- Add workflow_dispatch trigger for manual runs - Add Postgres service to T3 job (was missing) - Cache wasm-tools binary across T4/T5/T6 jobs - Add nightly schedule annotation in summary job
1 parent 4b08f94 commit 5444c40

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/integration-tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
schedule:
99
# Nightly at 3am UTC — catches flaky regressions on main
1010
- cron: '0 3 * * *'
11+
workflow_dispatch:
1112

1213
env:
1314
CARGO_TERM_COLOR: always
@@ -148,6 +149,22 @@ jobs:
148149
runs-on: ubuntu-latest
149150
timeout-minutes: 15
150151

152+
services:
153+
postgres:
154+
image: postgres:16
155+
env:
156+
POSTGRES_USER: testuser
157+
POSTGRES_PASSWORD: testpass
158+
POSTGRES_DB: testdb
159+
ports:
160+
- 5432:5432
161+
options: >-
162+
--health-cmd "pg_isready -U testuser"
163+
--health-interval 5s
164+
--health-timeout 5s
165+
--health-retries 5
166+
--tmpfs /var/lib/postgresql/data
167+
151168
steps:
152169
- uses: actions/checkout@v4
153170

@@ -184,7 +201,15 @@ jobs:
184201

185202
- uses: dtolnay/rust-toolchain@stable
186203

204+
- name: Cache wasm-tools
205+
id: wasm-tools-cache
206+
uses: actions/cache@v4
207+
with:
208+
path: ~/.cargo/bin/wasm-tools
209+
key: wasm-tools-${{ runner.os }}-v1
210+
187211
- name: Install wasm-tools
212+
if: steps.wasm-tools-cache.outputs.cache-hit != 'true'
188213
run: cargo install wasm-tools
189214

190215
- name: Cache ComponentizeJS
@@ -230,7 +255,15 @@ jobs:
230255

231256
- uses: dtolnay/rust-toolchain@stable
232257

258+
- name: Cache wasm-tools
259+
id: wasm-tools-cache
260+
uses: actions/cache@v4
261+
with:
262+
path: ~/.cargo/bin/wasm-tools
263+
key: wasm-tools-${{ runner.os }}-v1
264+
233265
- name: Install wasm-tools
266+
if: steps.wasm-tools-cache.outputs.cache-hit != 'true'
234267
run: cargo install wasm-tools
235268

236269
- name: Cache ComponentizeJS
@@ -315,7 +348,15 @@ jobs:
315348
with:
316349
version: "v41.0.0"
317350

351+
- name: Cache wasm-tools
352+
id: wasm-tools-cache
353+
uses: actions/cache@v4
354+
with:
355+
path: ~/.cargo/bin/wasm-tools
356+
key: wasm-tools-${{ runner.os }}-v1
357+
318358
- name: Install wasm-tools
359+
if: steps.wasm-tools-cache.outputs.cache-hit != 'true'
319360
run: cargo install wasm-tools
320361

321362
- name: Cache ComponentizeJS
@@ -377,6 +418,14 @@ jobs:
377418
pattern: test-results-*
378419
merge-multiple: true
379420

421+
- name: Annotate trigger context
422+
run: |
423+
if [ "${{ github.event_name }}" = "schedule" ]; then
424+
echo "::notice::This run was triggered by the nightly schedule (cron). Failures may indicate flaky regressions."
425+
echo "> **Nightly scheduled run** — failures here may indicate flaky regressions on main." >> "$GITHUB_STEP_SUMMARY"
426+
echo "" >> "$GITHUB_STEP_SUMMARY"
427+
fi
428+
380429
- name: Summary
381430
run: |
382431
echo "## Integration Test Results" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)