fix(ci): install backend deps for frontend tests that import backend code
This commit is contained in:
@@ -108,12 +108,16 @@ test-frontend:
|
||||
stage: test
|
||||
image: node:18
|
||||
cache:
|
||||
key: frontend-${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- frontend/node_modules/
|
||||
policy: pull
|
||||
- key: frontend-${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- frontend/node_modules/
|
||||
policy: pull
|
||||
- key: backend-${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- node_modules/
|
||||
policy: pull
|
||||
script:
|
||||
- cd frontend && (test -d node_modules || npm ci) && CI=true npx react-scripts test --watchAll=false --ci --testPathIgnorePatterns='atlasMetricsAggregation.property.test'
|
||||
- cd frontend && (test -d node_modules || npm ci) && cd .. && (test -d node_modules || npm ci) && cd frontend && CI=true npx react-scripts test --watchAll=false --ci
|
||||
timeout: 5 minutes
|
||||
needs:
|
||||
- install-frontend
|
||||
|
||||
Reference in New Issue
Block a user