Skip to content

ci: extract shared setup prelude into composite action#518

Open
staging-devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1779719242-extract-ci-setup-action
Open

ci: extract shared setup prelude into composite action#518
staging-devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1779719242-extract-ci-setup-action

Conversation

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor

@staging-devin-ai-integration staging-devin-ai-integration Bot commented May 25, 2026

Summary

  • Extract the duplicated CI setup prelude (free-disk, checkout, bun/UI build, apt, rust toolchain, sccache, rust-cache) from all 5 skit.yml jobs into .github/actions/setup-skit/action.yml.
  • The composite action accepts 5 inputs to handle per-job variations: rust-cache-key, rust-cache-workspaces, rust-components, skip-ui-build, runs-on-self-hosted.
  • Each job now collapses to a single uses: ./.github/actions/setup-skit step plus its job-specific commands and (where applicable) sccache save.
  • Bumping tool versions (Rust, Bun, action refs) now requires a single edit in the composite action.

Closes #436

Review & Validation

  • Verify the composite action inputs cover all per-job variations: lint (rust-components: rustfmt, clippy), coverage (rust-cache-workspaces, rust-components: llvm-tools-preview), test-gpu (skip-ui-build, runs-on-self-hosted).
  • CI passes on all 5 jobs — behavior should be identical to the previous inline steps.
  • Spot-check that sccache cache keys remain compatible (pattern: sccache-{rust-cache-key}-{os}-{hash}).

Notes

  • skip-ui-build is not set for lint because cargo clippy --workspace compiles skit, which embeds UI assets via RustEmbed. The issue suggested lint could skip UI build, but that would break clippy.
  • Coverage previously used aggressive free-disk settings (large-packages: true, swap-storage: true); the composite uses the standard settings. If coverage hits disk-space issues, a free-disk-aggressive input can be added.
  • Lint/test/build previously shared a single rust-cache key (skit); they now use per-job keys (skit-lint, skit-test, skit-build) to match the per-job sccache keys. First CI run after merge will have a one-time rust-cache miss.

Link to Devin session: https://staging.itsdev.in/sessions/90a735612c22449896cd1934b5d5d56e
Requested by: @streamer45


Devin Review

Status Commit
🟢 Reviewed 6fa477b
Open in Devin Review (Staging)

Move the duplicated setup steps (free-disk, checkout, bun, UI build,
apt, rust toolchain, sccache, rust-cache) from 5 jobs into
.github/actions/setup-skit/action.yml.

Closes #436

Signed-off-by: streamkit-devin <devin@streamkit.dev>
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Local composite actions require the repo to be checked out first so
GitHub can locate the action.yml file.

Signed-off-by: streamkit-devin <devin@streamkit.dev>
Copy link
Copy Markdown
Contributor Author

@staging-devin-ai-integration staging-devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Open in Devin Review (Staging)
Debug

Playground

docker-images: true
swap-storage: false

- uses: actions/checkout@v5
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Local composite action is used before the repository is checked out

Each Skit job now starts with uses: ./.github/actions/setup-skit, but local actions are resolved from the runner workspace, which is empty until actions/checkout has already run. The checkout step was moved inside the local composite action (.github/actions/setup-skit/action.yml:44), so the runner cannot load that action in the first place and the lint/test/coverage/GPU/build jobs fail before any setup executes. The same first-step pattern appears at .github/workflows/skit.yml:50, .github/workflows/skit.yml:83, .github/workflows/skit.yml:131, and .github/workflows/skit.yml:167.

Prompt for agents
Fix the Skit reusable workflow so the repository is checked out before any local action is referenced. The new .github/actions/setup-skit composite action includes actions/checkout internally, but that cannot bootstrap loading the local action itself. Add an actions/checkout step before every uses: ./.github/actions/setup-skit invocation in .github/workflows/skit.yml, or replace the local action with a non-local reusable mechanism that does not require workspace files to already exist. If adding separate checkout steps, also consider removing the checkout step from .github/actions/setup-skit/action.yml to avoid checking out twice.
Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already fixed in a35db2bactions/checkout@v5 now runs before the composite action in every job, and the checkout step was removed from the composite action.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.38%. Comparing base (b2d01c2) to head (a35db2b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #518      +/-   ##
==========================================
- Coverage   79.39%   79.38%   -0.02%     
==========================================
  Files         232      232              
  Lines       66904    66904              
  Branches     1909     1909              
==========================================
- Hits        53117    53110       -7     
- Misses      13781    13788       +7     
  Partials        6        6              
Flag Coverage Δ
backend 79.10% <ø> (-0.02%) ⬇️
ui 82.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 85.27% <ø> (ø)
engine 83.59% <ø> (-0.10%) ⬇️
api 89.98% <ø> (ø)
nodes 75.31% <ø> (-0.02%) ⬇️
server 80.26% <ø> (ø)
plugin-native 83.47% <ø> (ø)
plugin-wasm 91.90% <ø> (ø)
ui-services 84.67% <ø> (ø)
ui-components 60.49% <ø> (ø)
see 2 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

ci: extract per-job prelude (free-disk → checkout → bun → ui-build → apt → rust) into a composite action

2 participants