Skip to content

Commit 2b21e07

Browse files
ci(vite-plugin-angular): run decorator/signal drift detectors in conformance CI
The decorator and signal-API coverage detectors skip when ANGULAR_SOURCE_DIR is unset, so they never ran in CI. Sparse-checkout the upstream sources they read (packages/core/src and the ngtsc initializer-function list) alongside the compliance fixtures, and run both specs in the conformance job so the drift guards execute against every Angular version in the matrix. Addresses a CodeRabbit review finding on #2383. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent db35add commit 2b21e07

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/conformance.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ jobs:
4343
run: pnpm install --frozen-lockfile --prefer-offline
4444
- name: Download Angular ${{ matrix.angular-major }} compliance fixtures
4545
run: bash packages/vite-plugin-angular/scripts/setup-conformance.sh ${{ matrix.angular-major }}
46-
- name: Run conformance tests
46+
- name: Run conformance and upstream-drift tests
4747
env:
4848
ANGULAR_SOURCE_DIR: .angular-conformance
49-
run: pnpm exec vitest run packages/vite-plugin-angular/src/lib/compiler/conformance.spec.ts
49+
run: >-
50+
pnpm exec vitest run
51+
packages/vite-plugin-angular/src/lib/compiler/conformance.spec.ts
52+
packages/vite-plugin-angular/src/lib/compiler/decorator-coverage.spec.ts
53+
packages/vite-plugin-angular/src/lib/compiler/signal-api-coverage.spec.ts

packages/vite-plugin-angular/scripts/setup-conformance.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ if ! git clone --depth 1 --branch "$VERSION" --filter=blob:none --sparse \
7171
fi
7272

7373
cd "$TARGET"
74-
git sparse-checkout set packages/compiler-cli/test/compliance/test_cases
74+
# test_cases drives conformance.spec; core/src and the ngtsc initializer-function
75+
# list are the upstream sources the decorator / signal-API drift detectors read.
76+
git sparse-checkout set \
77+
packages/compiler-cli/test/compliance/test_cases \
78+
packages/core/src \
79+
packages/compiler-cli/src/ngtsc/annotations/directive/src
7580

7681
echo "Done. $(find packages/compiler-cli/test/compliance/test_cases -name '*.ts' | wc -l | tr -d ' ') test files downloaded."
7782
echo "Run: ANGULAR_SOURCE_DIR=$TARGET npx vitest run packages/vite-plugin-angular/src/lib/compiler/conformance.spec.ts"

0 commit comments

Comments
 (0)