mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
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>
28 lines
804 B
JavaScript
28 lines
804 B
JavaScript
const nxPreset = require('@nx/jest/preset').default;
|
|
|
|
const coverageReporters = ['json', 'json-summary', 'lcovonly', 'text-summary'];
|
|
|
|
const collectCoverageFrom = [
|
|
'src/**/*.{ts,js,mjs,html}',
|
|
'!src/**/*.{spec,test}.ts',
|
|
'!src/**/test-setup.ts',
|
|
'!src/**/test-stubs/**',
|
|
'!src/**/*.generated.*',
|
|
'!src/**/environments/**',
|
|
'!src/**/index.ts',
|
|
];
|
|
|
|
// CI points every Jest run at one directory (JEST_CACHE_DIRECTORY) so the
|
|
// transform cache can be persisted between workflow runs; unset, Jest keeps
|
|
// its default per-user temp directory.
|
|
const cacheDirectory = process.env.JEST_CACHE_DIRECTORY
|
|
? { cacheDirectory: process.env.JEST_CACHE_DIRECTORY }
|
|
: {};
|
|
|
|
module.exports = {
|
|
...nxPreset,
|
|
...cacheDirectory,
|
|
coverageReporters,
|
|
collectCoverageFrom,
|
|
};
|