Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 4 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,7 @@ on:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: npm

- run: npm ci

- name: Type check
run: npx tsc --noEmit

- name: Build
run: npm run build
test:
# Install + typecheck + build come from the reusable workflow so
# ci.yml and publish.yml can't drift apart.
uses: ./.github/workflows/test.yml
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ permissions:
contents: write

jobs:
test:
# Install + typecheck + build come from the reusable workflow.
# Same source as ci.yml so the two gates can't drift apart.
uses: ./.github/workflows/test.yml

publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -24,9 +30,6 @@ jobs:

- run: npm ci

- name: Type check
run: npx tsc --noEmit

- name: Build
run: npm run build

Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test

# Reusable workflow called by ci.yml (PR gate) and publish.yml (tag gate).
# Single source of truth for install + typecheck + build. If a tool version
# or script name changes, update this file only — both callers pick it up.

on:
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: npm

- run: npm ci

- name: Type check
run: npx tsc --noEmit

- name: Build
run: npm run build