perf(ci): skip unit coverage on PRs that cannot reach it and persist the Jest cache (#1711)

Pull requests whose changes cannot reach any Tier A test (allowlist checked against declared Tier A inputs and an AST scan of cross-project reads) skip the unit coverage suite; master pushes always run it. Jest's transform cache is persisted with actions/cache: PRs restore only, master pushes start empty and save. Paired CI runs: Tier A 9m04s cold -> 6m09s warm. Nx Cloud is intentionally not used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 authored and GitHub committed 2026-09-27 07:50:07 +02:00
1 parent 34d393adc8
commit e8902f472a
9 files changed
+648 -3

No files matched your search

+4
View File
@@ -21,6 +21,10 @@ const collectCoverageFrom = [
export default {
...nxPreset,
...angularEsmPreset,
// See jest.preset.js: CI persists the transform cache from this directory.
...(process.env.JEST_CACHE_DIRECTORY
? { cacheDirectory: process.env.JEST_CACHE_DIRECTORY }
: {}),
displayName: 'web',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/apps/web',