Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions .github/workflows/cjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,48 @@ on:
workflow_dispatch:

jobs:
js:
js-typecheck:
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 10
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-js-typecheck
cancel-in-progress: true
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
id: setup-node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version: "24"
cache: npm
cache-dependency-path: actions/setup/js/package-lock.json
- name: Report Node cache status
run: |
if [ "${{ steps.setup-node.outputs.cache-hit }}" == "true" ]; then
echo "✅ Node cache hit" >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ Node cache miss" >> $GITHUB_STEP_SUMMARY
fi
- name: Install npm dependencies
run: cd actions/setup/js && npm ci

- name: Run typecheck
run: cd actions/setup/js && npm run typecheck

js-tests:
name: JS Tests (shard ${{ matrix.shard }}/4)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
strategy:
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

The matrix strategy defaults to fail-fast: true, which will cancel the other test shards as soon as one shard fails. That undermines the stated goal of improving failure triage with sharded execution; consider setting strategy.fail-fast: false so all shards complete and report their failures.

Suggested change
strategy:
strategy:
fail-fast: false

Copilot uses AI. Check for mistakes.
matrix:
shard: [1, 2, 3, 4]
concurrency:
group: ci-${{ github.ref }}-js
group: ci-${{ github.ref }}-js-tests-${{ matrix.shard }}
cancel-in-progress: true
steps:
- name: Checkout code
Expand All @@ -46,7 +81,8 @@ jobs:
mkdir -p ${{ runner.temp }}/gh-aw/prompts
cp actions/setup/md/*.md ${{ runner.temp }}/gh-aw/prompts/
- name: Run tests
run: cd actions/setup/js && npm test
# Keep no-file-parallelism so Vitest sharding has deterministic test scheduling per shard.
run: cd actions/setup/js && npm run test:js -- --no-file-parallelism --shard=${{ matrix.shard }}/4
Comment on lines +84 to +85
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

The shard total (4) is hard-coded in multiple places (job name, --shard=…/4). This can drift if the matrix size changes; consider defining a single source of truth (e.g., an env var for total shards) and referencing it in the test command (and job name) to avoid mismatches.

Copilot uses AI. Check for mistakes.

lint-js:
runs-on: ubuntu-latest
Expand Down
Loading