fix(ci): install backend deps for frontend tests that import backend code

This commit is contained in:
Jordan Ramos
2026-05-26 16:30:14 -06:00
parent 44ecf98da6
commit d081961341

View File

@@ -108,12 +108,16 @@ test-frontend:
stage: test stage: test
image: node:18 image: node:18
cache: cache:
key: frontend-${CI_COMMIT_REF_SLUG} - key: frontend-${CI_COMMIT_REF_SLUG}
paths: paths:
- frontend/node_modules/ - frontend/node_modules/
policy: pull policy: pull
- key: backend-${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
policy: pull
script: 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 timeout: 5 minutes
needs: needs:
- install-frontend - install-frontend