Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
ci: split the web check into static and sharded test jobs
shoudi zheng999c8a239f30
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 0bef52c1..de1ab35f 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -1,7 +1,8 @@name: CI# The repository gate runs on every pull request and merge-queue build; each-# app's fast check runs only when its paths change. A merge-queue build+# app's fast check runs only when its paths change; the web check is split+# into a static job and sharded test jobs. A merge-queue build# checks the paths its whole group changes, on top of the latest main. Pushes# to main run every check. CI runs the# computer daemon's Go unit tests; the rest of check-computer (TS and process@@ -82,6 +83,68 @@ jobs:- uses: ./.github/actions/setup- run: make check-repository-gate BASE="$BASE"+ web-static:+ needs: changes+ if: needs.changes.outputs.web == 'true'+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ with:+ fetch-depth: 0+ - uses: ./.github/actions/setup+ - run: make check-web-static BASE="$BASE"++ web-tests:+ name: web tests (${{ matrix.shard }}/3)+ needs: changes+ if: needs.changes.outputs.web == 'true'+ runs-on: ubuntu-latest+ strategy:+ fail-fast: false+ matrix:+ shard: [1, 2, 3]+ steps:+ - uses: actions/checkout@v4+ with:+ fetch-depth: 0+ - uses: ./.github/actions/setup+ - run: make check-web-tests SHARD=${{ matrix.shard }}/3++ # Reports the required `check (web)` context from the split web jobs. When+ # web paths changed, every web job must succeed (an unexpected skip fails);+ # otherwise they must have been skipped. A failed path filter always fails.+ web:+ name: check (web)+ needs: [changes, web-static, web-tests]+ if: always()+ runs-on: ubuntu-latest+ steps:+ - shell: bash+ env:+ CHANGES_RESULT: ${{ needs.changes.result }}+ WEB_CHANGED: ${{ needs.changes.outputs.web }}+ WEB_STATIC_RESULT: ${{ needs.web-static.result }}+ WEB_TESTS_RESULT: ${{ needs.web-tests.result }}+ run: |+ set -euo pipefail+ if [ "$CHANGES_RESULT" != success ]; then+ echo "changes job result: $CHANGES_RESULT" >&2+ exit 1+ fi+ status=0+ for job in web-static:"$WEB_STATIC_RESULT" web-tests:"$WEB_TESTS_RESULT"; do+ name=${job%%:*}+ result=${job#*:}+ if [ "$WEB_CHANGED" = true ]; then+ [ "$result" = success ] && continue+ else+ [ "$result" = success ] || [ "$result" = skipped ] && continue+ fi+ echo "$name job result: $result (web changed: $WEB_CHANGED)" >&2+ status=1+ done+ exit "$status"+check:needs: changesruns-on: ubuntu-latest@@ -90,7 +153,6 @@ jobs:matrix:app:[- web,packages,teamhub-cli,installer,diff --git a/Makefile b/Makefileindex e490d45a..62e813ff 100644--- a/Makefile+++ b/Makefile@@ -1,6 +1,6 @@.PHONY: contracts-generate contracts-verify computer-release-local source-archive source-dependencies.PHONY: check-teamhub-cli check-installer check-desktop-.PHONY: check check-heavy-lane check-web+.PHONY: check check-heavy-lane check-web check-web-static check-web-tests.PHONY: check-computer check-computer-go check-computer-release check-node-services check-voice-runtime.PHONY: check-teamhub check-teamhub-tooling check-teamhub-integration.PHONY: check-teamhub-integration-process check-teamhub-integration-migrations@@ -70,12 +70,28 @@ check-repository:# branch reports the all-zero commit, which is not a ref.DOCTOR_BASE = $(if $(filter-out 0000000000000000000000000000000000000000,$(BASE)),--base '$(BASE)')+WEB_TYPES = pnpm --filter @linger/web typecheck+WEB_LINT = pnpm --filter @linger/web lint+WEB_TESTS = pnpm --filter @linger/web test+WEB_DOCTOR = pnpm react:doctor $(DOCTOR_BASE)+check-web:pnpm exec concurrently --success all --names types,lint,tests,doctor \- "pnpm --filter @linger/web typecheck" \- "pnpm --filter @linger/web lint" \- "pnpm --filter @linger/web test" \- "pnpm react:doctor $(DOCTOR_BASE)"+ "$(WEB_TYPES)" \+ "$(WEB_LINT)" \+ "$(WEB_TESTS)" \+ "$(WEB_DOCTOR)"++# CI runs these as separate jobs (tests in shards, e.g. SHARD=2/3);+# check-web stays the local entry point.+check-web-static:+ pnpm exec concurrently --success all --names types,lint,doctor \+ "$(WEB_TYPES)" \+ "$(WEB_LINT)" \+ "$(WEB_DOCTOR)"++check-web-tests:+ $(WEB_TESTS)$(if $(SHARD), --shard=$(SHARD))check-node-services:pnpm --filter @linger/node-services checkdiff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 33a1e5cf..251ca02b 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -11,6 +11,8 @@ React Router Data Mode and TanStack Query power the active Room-first UI.before opening a pull request. If the change adds a static import on theRoom or app initial graph, also run `pnpm --filter @linger/web runbuild:assets` to check the initial JS budget.+ CI runs it as `make check-web-static` plus `make check-web-tests` in three+ shards (`SHARD=1/3` and so on).## Structure