Skip to content

test(cli,mcp): stats aggregation had zero tests, and an absent IsExternal read as external #848

test(cli,mcp): stats aggregation had zero tests, and an absent IsExternal read as external

test(cli,mcp): stats aggregation had zero tests, and an absent IsExternal read as external #848

Workflow file for this run

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# SDK canary — runs the bundled `tests/extensions/canaries/` set against the
# current `@ifc-lite/extensions` library on every PR. The goal is to catch
# SDK-shape regressions early: if a canary bundle's manifest.tests no longer
# pass against the candidate SDK, the PR is flagged before merge.
#
# This is the Phase 4 / RFC §06 §5 canary loop. The hosted registry version
# (T18 full) substitutes the canary set with extensions pulled from the
# registry; for v1 we use a curated fixture set checked into the repo.
name: SDK canary
on:
pull_request:
branches: [main]
paths:
- 'packages/extensions/**'
- 'packages/cli/**'
- 'tests/extensions/canaries/**'
- '.github/workflows/sdk-canary.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
canary:
name: Run canary bundles
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: false
- name: Setup pnpm
# v6 reads the pnpm version from the `packageManager` field in
# package.json (`pnpm@10.8.1`); passing `with.version` would conflict.
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
cache: pnpm
# @ifc-lite/cli transitively type-depends on @ifc-lite/wasm (its deps'
# .d.ts files reference it), and @ifc-lite/wasm's build is wasm-pack —
# so this job needs the full wasm toolchain too.
- name: Setup WASM build toolchain
uses: ./.github/actions/setup-wasm-build
with:
cache-prefix: sdk-canary
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build WASM
run: bash scripts/build-wasm.sh
# `turbo build` honours `^build`, so this builds every workspace
# dependency of cli/extensions in topological order. The previous
# `pnpm -F @ifc-lite/cli build` built cli alone and failed because
# @ifc-lite/create, query, data, parser, export, sdk and viewer-core
# had no dist/ to resolve against.
- name: Build extensions + CLI
run: pnpm turbo build --filter=@ifc-lite/extensions --filter=@ifc-lite/cli
# Canaries are a curated fixture set. Each subdirectory under
# tests/extensions/canaries/ is a bundle. We run the CLI's
# `ext test` against every one; non-zero exit fails the job.
- name: Run canary bundles
run: |
set -e
if [ ! -d tests/extensions/canaries ]; then
echo "No canary bundles in tests/extensions/canaries/; skipping."
exit 0
fi
failures=0
for dir in tests/extensions/canaries/*/; do
name=$(basename "$dir")
echo "::group::canary: $name"
if ! node packages/cli/dist/index.js ext test "$dir" --json; then
echo "::error::canary $name failed"
failures=$((failures+1))
fi
echo "::endgroup::"
done
if [ "$failures" -gt 0 ]; then
echo "$failures canary bundle(s) failed."
exit 1
fi
echo "All canary bundles passed."