ci(build): keep Angular's disk cache in CI so the cache step has something to save
Build / Build-and-ng-test (pull_request) Successful in 6m6s
Lighthouse Checks / lighthouse (pull_request) Successful in 8m20s
Build / Build-and-test-development (pull_request) Canceled after 8m43s

The first run of these cache steps showed the npm entry saving (234 MB) and the
Angular one reporting 'Path Validation Error: Path(s) specified in the action
for caching do(es) not exist'. Angular keeps its persistent cache in memory
when CI is set, so no .angular/cache directory existed to upload; the disk
cache is only used outside CI by default.

client/angular.json now sets cli.cache.environment to "all", which is the
supported switch for that. Verified locally with CI=true: after removing
.angular/cache, a build recreates it (396 MB).
This commit is contained in:
dc committed 2026-11-04 21:08:40 +00:00
1 parent 9d30e1855f
commit 5f8f668c66
2 files changed
+9 -1

No files matched your search

+5
View File
@@ -105,6 +105,11 @@ jobs:
# cache is content-addressed and drops its own stale entries, so a
# lockfile-keyed entry stays correct.
#
# Angular keeps that cache in memory when CI is set, so client/
# angular.json sets cli.cache.environment to "all" - without it this
# step has nothing to save ("Path Validation Error: Path(s) specified
# in the action for caching do(es) not exist").
#
# actions/cache does not save a second entry for a key that already
# exists, so this cache is refreshed only when client/package-lock.json
# changes. The win therefore decays as the app moves away from the
+4 -1
View File
@@ -1,7 +1,10 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
"analytics": false,
"cache": {
"environment": "all"
}
},
"version": 1,
"newProjectRoot": "projects",