Skip to content

Add lightweight pre-check action for git-glimpse pipeline#15

Merged
DeDuckProject merged 2 commits intomainfrom
claude/optimize-ci-performance-NNIvU
Mar 12, 2026
Merged

Add lightweight pre-check action for git-glimpse pipeline#15
DeDuckProject merged 2 commits intomainfrom
claude/optimize-ci-performance-NNIvU

Conversation

@DeDuckProject
Copy link
Copy Markdown
Owner

Summary

This PR introduces a new lightweight pre-check entrypoint for the git-glimpse action that runs early in the workflow before heavy dependencies are installed. This allows the pipeline to decide whether to proceed with the full execution, reducing unnecessary resource consumption.

Key Changes

  • New check.ts module: Adds a pre-check entrypoint that runs before ffmpeg and Playwright installations to determine if the git-glimpse pipeline should execute
  • Build output: Compiled the new check module to dist/check.js with source maps
  • Workflow improvements: Updated CI and demo workflows to enable pnpm caching in the Node.js setup step for faster dependency resolution
  • Build script updates: Extended the build script in package.json to compile both the main action and the new check module

Implementation Details

  • The check module is designed to be a fast, early-stage validation step
  • Outputs a should-run step output to control downstream workflow execution
  • Maintains separation of concerns by keeping the lightweight check separate from the main action logic
  • Workflow caching improvements reduce CI/CD execution time by leveraging pnpm's cache

https://claude.ai/code/session_014X9H6DRMx8hHT9En1GXDGt

claude added 2 commits March 12, 2026 15:20
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_014X9H6DRMx8hHT9En1GXDGt
Bug fix:
- pnpm/action-setup must run before setup-node with cache: 'pnpm' so
  that pnpm is on PATH when setup-node tries to locate it for caching.
  Fixes "Unable to locate executable file: pnpm" error in CI.

User-facing:
- Add check-trigger/action.yml: a reusable action at
  DeDuckProject/git-glimpse/check-trigger@v1 that exposes the trigger
  pre-check to users. They can gate their ffmpeg/Playwright installs on
  the `should-run` output to skip heavy deps on no-op runs.
- Add check-trigger/README.md with full usage documentation and examples
  including Playwright browser caching tips.
- Update demo.yml to use ./check-trigger as a proper `uses:` step
  (removing the ad-hoc `run: node` step), which also tests the action.

Issue tracking:
- Add .github/issues/self-contained-action.md with the description for
  the future work of making the action fully self-contained (no pre-install
  steps needed from users at all).

https://claude.ai/code/session_014X9H6DRMx8hHT9En1GXDGt
@DeDuckProject DeDuckProject merged commit 7e9ec25 into main Mar 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants