Skip to content

feat(loop): ground floating-geometry & object-count gates in geometry #980

feat(loop): ground floating-geometry & object-count gates in geometry

feat(loop): ground floating-geometry & object-count gates in geometry #980

Workflow file for this run

name: CI
# Path-filters skip CI on truly content-only changes (top-level README/LICENSE/
# CHANGELOG, plus docs/ which is human-written prose). Anything that COULD
# affect runtime — src/, tests/, scripts/, eval/, site/, package*.json,
# tsconfig*.json, .github/workflows/ — still triggers CI.
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'CHANGELOG.md'
- 'LICENSE'
- 'RELEASE_NOTES.md'
- 'docs/**'
- 'doc/**'
- 'archive/**'
pull_request:
branches:
- master
- develop
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'CHANGELOG.md'
- 'LICENSE'
- 'RELEASE_NOTES.md'
- 'docs/**'
- 'doc/**'
- 'archive/**'
workflow_dispatch:
# Required so the branch-protection merge queue gets its checks: the queue
# tests a speculative merge on a temporary `merge_group` ref and waits for the
# same required checks (lint / build-and-checks / test) to report there.
merge_group:
permissions:
contents: read
concurrency:
# Keyed per-PR (a new push cancels the prior run) but per-run for merge_group
# so queued entries never cancel one another.
group: ci-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
# Three independent QC jobs run in parallel; e2e (master-only) gates on all
# three being green. See ci-acceleration-design (in kernelCAD-private).
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
- name: QC — lint
run: npm run qc:lint
build-and-checks:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
- name: QC — typecheck + build:cli + cookbook + drift check
run: npm run qc:build
# The vitest suite is sharded across parallel runners so the merge gate
# stays ~2 min wall-clock instead of one ~12 min monolith. Every test still
# runs on every PR — sharding changes distribution, not coverage. The
# `test` gate job below is the required branch-protection check; it goes
# green only when ALL shards pass.
test-shard:
runs-on: ubuntu-latest
# 15 (not 10) gives headroom for the shard that draws the heavy physics
# example-sweep tests (a single example can run ~6 min) so a legitimately
# slow run is never cancelled mid-test. Setup itself is now near-instant
# (ffmpeg preinstalled; apt fallback bounded) so this is pure test headroom.
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
# cli-bundle and eval/* integration tests require the bundled CLI at
# dist/cli/index.js; we rebuild it in each shard's runner because jobs
# run on separate runners with isolated FS. The shared build cache
# keeps this fast (~10-15s on hit).
- name: Build CLI bundle (required by integration tests)
run: npm run build:cli
- name: QC — vitest (shard ${{ matrix.shard }}/12)
run: npm test -- --shard=${{ matrix.shard }}/12
# Gate job: carries the required-check name `test` so branch protection is
# unchanged. if: always() ensures it reports failure (rather than being
# skipped) when a shard fails or is cancelled.
test:
runs-on: ubuntu-latest
timeout-minutes: 2
needs: test-shard
if: always()
steps:
- name: All test shards green
run: |
[ "${{ needs.test-shard.result }}" = "success" ] || { echo "shard result: ${{ needs.test-shard.result }}"; exit 1; }
e2e:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [lint, build-and-checks, test]
if: >
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'pull_request' && github.base_ref == 'master') ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master')
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: E2E tests (Playwright)
run: npm run test:e2e
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report
retention-days: 7
- name: Upload Playwright traces (on failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-test-results
path: test-results
retention-days: 7