Skip to content

fix(ci): skip Playwright tests in insider publish (covered by Squad CI)#852

Closed
tamirdresher wants to merge 2 commits intodevfrom
fix/skip-playwright-insider
Closed

fix(ci): skip Playwright tests in insider publish (covered by Squad CI)#852
tamirdresher wants to merge 2 commits intodevfrom
fix/skip-playwright-insider

Conversation

@tamirdresher
Copy link
Copy Markdown
Collaborator

The insider publish workflow was running all tests including \�spire-integration.test.ts\ which requires Playwright/Docker — unnecessary since Squad CI already covers these.

Change: In \squad-insider-publish.yml, changed
pm test\ to
px vitest run --exclude 'test/aspire-integration.test.ts'.

Why: The Playwright-dependent test (\�spire-integration.test.ts) needs Docker + Chromium. The publish workflow only needs to verify core functionality before publishing. Full integration coverage is handled by Squad CI.

Release workflow: \squad-insider-release.yml\ uses
ode --test test/*.test.cjs\ (different runner, no Playwright dependency) — no change needed.

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

Copilot and others added 2 commits April 5, 2026 13:41
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 5, 2026 11:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

🟢 Impact Analysis — PR #852

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.

@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

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 8fc3104

⚠️ 3 item(s) to address before review

Status Check Details
Single commit 2 commits — consider squashing before review
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 1 check(s) failing: release

This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements 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

Updates the insider publish GitHub Actions workflow to avoid running Playwright/Docker-dependent integration coverage during publish, relying on the main Squad CI workflow for full integration testing.

Changes:

  • Bump the workflow’s Node.js matrix from 20 to 22 across jobs.
  • Add an explicit build step in the test job.
  • Replace npm test with a Vitest invocation that excludes test/aspire-integration.test.ts.

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 even though there is already a separate build job and no artifacts are being passed between jobs. Since each job runs on a fresh runner, this means the project is built twice with no shared output. Consider either removing the standalone build job, or removing this duplicate build step (or uploading build artifacts from the build job and downloading them here if tests truly need the built output).

Suggested change
- name: Build
run: npm run build

Copilot uses AI. Check for mistakes.
run: npm run build

- name: Run tests (skip Playwright — covered by Squad CI)
run: npx vitest run --exclude 'test/aspire-integration.test.ts'
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.

This workflow runs tests via npx vitest ..., which bypasses the repo’s npm test script (package.json defines test as vitest run). Using npm test (passing the exclude via --) keeps CI aligned with the standard entrypoint and avoids any behavioral differences from npx resolution.

Suggested change
run: npx vitest run --exclude 'test/aspire-integration.test.ts'
run: npm test -- --exclude 'test/aspire-integration.test.ts'

Copilot uses AI. Check for mistakes.
Comment on lines 15 to +17
strategy:
matrix:
node-version: [20]
node-version: [22]
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 PR description says the change is swapping the test command, but this workflow also bumps the Node version from 20 to 22 for multiple jobs. Please update the PR description to mention the Node upgrade (or split it into a separate PR) so reviewers understand the full CI surface-area change.

Copilot uses AI. Check for mistakes.
run: npm run build

- name: Run tests (skip Playwright — covered by Squad CI)
run: npx vitest run --exclude 'test/aspire-integration.test.ts'
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.

Skipping the Docker/Playwright integration via a hardcoded --exclude test/aspire-integration.test.ts is brittle (a rename/move could accidentally re-enable it in the publish workflow). Since the test already supports SKIP_DOCKER_TESTS=1, consider setting that env var for this step so the workflow intent stays stable even if the file path changes.

Suggested change
run: npx vitest run --exclude 'test/aspire-integration.test.ts'
env:
SKIP_DOCKER_TESTS: '1'
run: npx vitest run

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