Răsfoiți Sursa

ci: only reinstall frontend dependencies when they change

The deps target ran npm ci every time, so a CI job that builds the web UI
and then runs the frontend unit tests installed the same packages twice.
Make deps depend on npm's installed lockfile marker, so npm ci only runs
again when package.json or package-lock.json is newer than the install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesread 21 ore în urmă
părinte
comite
1c89236756
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      frontend/Makefile

+ 5 - 1
frontend/Makefile

@@ -14,7 +14,11 @@ unittests: deps
 clean:
 	$(call delete-files,dist)
 
-deps:
+# npm ci writes node_modules/.package-lock.json, so it only needs to run again
+# when package.json or the lockfile is newer than the last install.
+deps: node_modules/.package-lock.json
+
+node_modules/.package-lock.json: package.json package-lock.json
 	npm ci
 
 build: