fix(ci): add npm ci fallback for cache misses
This commit is contained in:
@@ -62,6 +62,7 @@ lint-backend:
|
||||
- node_modules/
|
||||
policy: pull
|
||||
script:
|
||||
- test -d node_modules || npm ci
|
||||
- node -c backend/server.js
|
||||
- node -c backend/routes/*.js
|
||||
- node -c backend/helpers/*.js
|
||||
@@ -78,6 +79,7 @@ lint-frontend:
|
||||
- frontend/node_modules/
|
||||
policy: pull
|
||||
script:
|
||||
- cd frontend && test -d node_modules || npm ci
|
||||
- cd frontend && npx eslint src/ --ignore-pattern '**/__tests__/**' --ignore-pattern '**/*.test.js' --max-warnings 25
|
||||
needs:
|
||||
- install-frontend
|
||||
@@ -97,6 +99,7 @@ test-backend:
|
||||
- node_modules/
|
||||
policy: pull
|
||||
script:
|
||||
- test -d node_modules || npm ci
|
||||
- ./node_modules/.bin/jest --ci --forceExit backend/__tests__/
|
||||
timeout: 5 minutes
|
||||
needs:
|
||||
@@ -111,6 +114,7 @@ test-frontend:
|
||||
- frontend/node_modules/
|
||||
policy: pull
|
||||
script:
|
||||
- cd frontend && test -d node_modules || npm ci
|
||||
- cd frontend && CI=true npx react-scripts test --watchAll=false --ci
|
||||
timeout: 5 minutes
|
||||
needs:
|
||||
@@ -129,6 +133,7 @@ build-frontend:
|
||||
- frontend/node_modules/
|
||||
policy: pull
|
||||
script:
|
||||
- cd frontend && test -d node_modules || npm ci
|
||||
- cd frontend && CI=false REACT_APP_API_BASE=/api REACT_APP_API_HOST="" npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
|
||||
Reference in New Issue
Block a user