Commit 5258830
committed
feat: add early trigger check and caching to CI workflows
Before this change the workflows installed ffmpeg (~94 MB, 100 packages)
and Playwright Chromium on every run, even when the trigger config
(on-demand / smart mode) would decide to skip the pipeline.
Changes:
- Add packages/action/src/check.ts: lightweight pre-check entrypoint
that evaluates the trigger and writes a `should-run` step output.
Mirrors the early logic in index.ts but exits before any heavy work.
- Update build script to also compile check.ts → dist/check.js.
- demo.yml: run the trigger check immediately after `pnpm install`,
then gate ffmpeg, Playwright, app start, and the action itself with
`if: steps.check.outputs.should-run == 'true'`.
Also adds pnpm store caching and Playwright browser caching.
- ci.yml: add pnpm store caching to both jobs, add Playwright browser
caching to the integration-tests job.
On skipped runs the job now exits after a few seconds of lightweight
setup. On cache-hit runs the heavy installs are also significantly
faster.
https://claude.ai/code/session_014X9H6DRMx8hHT9En1GXDGt1 parent ee1b456 commit 5258830
8 files changed
Lines changed: 30341 additions & 3 deletions
File tree
- .github/workflows
- packages/action
- dist
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
39 | 54 | | |
| 55 | + | |
40 | 56 | | |
41 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
42 | 66 | | |
| 67 | + | |
43 | 68 | | |
44 | 69 | | |
45 | 70 | | |
| 71 | + | |
46 | 72 | | |
47 | 73 | | |
48 | 74 | | |
| 75 | + | |
49 | 76 | | |
50 | 77 | | |
51 | 78 | | |
| |||
55 | 82 | | |
56 | 83 | | |
57 | 84 | | |
| 85 | + | |
58 | 86 | | |
59 | 87 | | |
60 | 88 | | |
| |||
0 commit comments