Skip to content

fix: insider publish workflow - add build step and use Node 22#851

Closed
tamirdresher wants to merge 1 commit intodevfrom
fix/insider-publish-workflow
Closed

fix: insider publish workflow - add build step and use Node 22#851
tamirdresher wants to merge 1 commit intodevfrom
fix/insider-publish-workflow

Conversation

@tamirdresher
Copy link
Copy Markdown
Collaborator

Problem

The insider publish workflow (squad-insider-publish.yml) had 80+ test failures every run, blocking insider publishes.

Root Cause

  1. Missing build step in test job: The build and test jobs run on separate VMs. Since dist/ is gitignored, the test job starts with a fresh checkout that has no compiled output. Vitest fails to resolve workspace package exports.

  2. Wrong Node version: All jobs used node-version [20], but both packages declare engines.node >= 22.5.0. The CLI version gate rejects Node 20 at runtime.

Fix

  • Added npm run build step to the test job (matching what the main CI does)
  • Changed all jobs from node-version [20] to [22] (matching engines requirement and main CI)

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The insider publish workflow had two issues causing 80+ test failures:

1. The test job ran on a separate VM from the build job with no
   artifact transfer. Since dist/ is gitignored, the test job had
   no compiled output. Vitest failed to resolve workspace package
   exports (e.g. @bradygaster/squad-sdk entry, squad-cli/commands/rc)
   because the dist files they point to didn't exist.

2. All three jobs used Node 20, but both packages declare
   engines.node >= 22.5.0. The CLI's version gate rejected Node 20
   at runtime, causing additional failures.

Fix: Add 'npm run build' step to the test job, and update all jobs
from node-version [20] to [22] to match the engines requirement
and the main CI workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 5, 2026 10:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 61f53c2

⚠️ 2 item(s) to address before review

Status Check Details
Single commit 1 commit — clean history
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present No source files changed — changeset not required
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved No Copilot review threads
CI passing 17 check(s) still running

This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

🏗️ Architectural Review

⚠️ Architectural review: 1 info.

Severity Category Finding Files
ℹ️ info template-sync Template files changed in .github/workflows/ but not in other template locations. If these templates should stay in sync, consider updating the others too. Changed: .github/workflows/, Unchanged: templates/, .squad-templates/, packages/squad-cli/templates/

Automated architectural review — informational only.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

🟢 Impact Analysis — PR #851

Risk tier: 🟢 LOW

📊 Summary

Metric Count
Files changed 1
Files added 0
Files modified 1
Files deleted 0
Modules touched 1

🎯 Risk Factors

  • 1 files changed (≤5 → LOW)
  • 1 module(s) touched (≤1 → LOW)

📦 Modules Affected

ci-workflows (1 file)
  • .github/workflows/squad-insider-publish.yml

This report is generated automatically for every PR. See #733 for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the insider publish GitHub Actions workflow so tests run against compiled workspace outputs and the workflow runs on a Node.js version compatible with the repo’s declared engines.

Changes:

  • Bumped all jobs in squad-insider-publish.yml from Node 20 to Node 22.
  • Added an explicit npm run build step to the test job before npm test.

Comment on lines +44 to +46
- name: Build
run: npm run build

Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The test job now runs npm run build, but the separate build job already builds and does not publish artifacts. Since GitHub Actions jobs run on separate runners, this results in two independent builds with no reuse. Consider either (a) removing the standalone build job and dropping needs: build, or (b) uploading build outputs from build and downloading them in test to avoid redundant work.

Copilot uses AI. Check for mistakes.
tamirdresher pushed a commit that referenced this pull request Apr 5, 2026
- Upgrade all jobs from Node 20 to Node 22 (actions/setup-node v4 compat)
- Add build step in test job (tests need compiled output)
- Install Playwright Chromium with deps so aspire-integration tests run
- Exclude only docs-build test (needs Docker, unavailable on runner)

Supersedes: #851, #852
@tamirdresher
Copy link
Copy Markdown
Collaborator Author

Closing as stale. Reason: CI fix PR with merge conflicts and failures. The fixes have likely been applied via other PRs.

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