From d08196134195fa11de980853464b245f138b75c3 Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Tue, 26 May 2026 16:30:14 -0600 Subject: [PATCH] fix(ci): install backend deps for frontend tests that import backend code --- .gitlab-ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e25277c..c8896e1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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