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
16 changes: 2 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,9 @@ jobs:
FALLOW_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
run: pnpm check:fallow --base "$FALLOW_BASE"

unit:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm

- name: Run unit tests
run: pnpm test:unit

coverage:
# Runs the full unit + provider-integration suites under coverage with
# thresholds, so a separate unit-tests job would rerun the same tests.
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: Size

on:
pull_request:
paths-ignore:
- "docs/**"
- "website/**"
- "README.md"
- ".github/actions/build-docs/action.yml"
- ".github/workflows/deploy.yml"
- ".github/workflows/pr-preview.yml"
- ".github/workflows/pr-preview-cleanup.yml"

permissions:
contents: read
Expand Down Expand Up @@ -29,15 +37,35 @@ jobs:
- name: Preserve report script
run: cp scripts/size-report.mjs /tmp/agent-device-size-report.mjs

# dist is fully determined by the base commit, so reuse it across PR runs
# against the same base. Startup medians are still measured fresh on this
# runner so the base/PR comparison stays same-machine.
- name: Restore base dist cache
id: base-dist-cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.3
with:
path: dist
key: size-base-dist-${{ github.event.pull_request.base.sha }}

- name: Measure base size
run: |
git checkout --detach "${{ github.event.pull_request.base.sha }}"
pnpm install --frozen-lockfile
pnpm build
if [ "${{ steps.base-dist-cache.outputs.cache-hit }}" != "true" ]; then
pnpm build
fi
node /tmp/agent-device-size-report.mjs \
--startup-runs 7 \
--json /tmp/agent-device-size-base.json

# Save immediately: the job-end dist belongs to the PR head, not the base.
- name: Save base dist cache
if: steps.base-dist-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.3
with:
path: dist
key: size-base-dist-${{ github.event.pull_request.base.sha }}

- name: Measure PR size
run: |
git checkout --detach "${{ github.event.pull_request.head.sha }}"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
"check:unit": "pnpm test:unit && pnpm test:smoke",
"check": "pnpm check:tooling && pnpm check:fallow && pnpm check:unit",
"prepack": "pnpm check:mcp-metadata && pnpm build:all && pnpm package:android-snapshot-helper:npm && pnpm package:android-multitouch-helper:npm",
"typecheck": "tsc -p tsconfig.json",
"typecheck": "tsgo -p tsconfig.json",
"typecheck:tsc": "tsc -p tsconfig.json",
"test-app:install": "pnpm install --dir examples/test-app --ignore-workspace",
"test-app:start": "pnpm --dir examples/test-app start",
"test-app:ios": "pnpm --dir examples/test-app ios",
Expand Down
Loading