Преглед на файлове

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 часа
родител
ревизия
1c89236756
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      frontend/Makefile

+ 5 - 1
frontend/Makefile

@@ -14,7 +14,11 @@ unittests: deps
 clean:
 clean:
 	$(call delete-files,dist)
 	$(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
 	npm ci
 
 
 build:
 build: