From cc652ba964bc98b78efb59e74e90923c954b5fb1 Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Fri, 8 May 2026 13:35:50 -0600 Subject: [PATCH] Fix CI: add npm ci to each job since runner cache is unreliable, use local jest binary --- .gitlab-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1809af..7c4bb88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,13 +78,14 @@ install-frontend: lint-frontend: stage: lint script: - - cd frontend && npx eslint src/ --ignore-pattern '**/__tests__/**' --ignore-pattern '**/*.test.js' --max-warnings 10 + - cd frontend && npm ci --prefer-offline && npx eslint src/ --ignore-pattern '**/__tests__/**' --ignore-pattern '**/*.test.js' --max-warnings 10 needs: - install-frontend lint-backend: stage: lint script: + - npm ci --prefer-offline - node -c backend/server.js - node -c backend/routes/*.js - node -c backend/helpers/*.js @@ -99,7 +100,8 @@ lint-backend: test-backend: stage: test script: - - npx jest --ci --forceExit backend/__tests__/ + - npm ci --prefer-offline + - ./node_modules/.bin/jest --ci --forceExit backend/__tests__/ timeout: 5 minutes needs: - install-backend @@ -107,7 +109,7 @@ test-backend: test-frontend: stage: test script: - - cd frontend && CI=true npx react-scripts test --watchAll=false --ci + - cd frontend && npm ci --prefer-offline && CI=true npx react-scripts test --watchAll=false --ci timeout: 5 minutes needs: - install-frontend @@ -119,7 +121,7 @@ test-frontend: build-frontend: stage: build script: - - cd frontend && CI=false REACT_APP_API_BASE=/api REACT_APP_API_HOST="" npm run build + - cd frontend && npm ci --prefer-offline && CI=false REACT_APP_API_BASE=/api REACT_APP_API_HOST="" npm run build artifacts: paths: - frontend/build/