fix(ci): fix cd not persisting across script lines

This commit is contained in:
Jordan Ramos
2026-05-26 16:26:12 -06:00
parent 1a6f956fb8
commit 594b170826

View File

@@ -79,8 +79,7 @@ lint-frontend:
- frontend/node_modules/ - frontend/node_modules/
policy: pull policy: pull
script: script:
- cd frontend && test -d node_modules || npm ci - cd frontend && (test -d node_modules || npm ci) && npx eslint src/ --ignore-pattern '**/__tests__/**' --ignore-pattern '**/*.test.js' --max-warnings 25
- cd frontend && npx eslint src/ --ignore-pattern '**/__tests__/**' --ignore-pattern '**/*.test.js' --max-warnings 25
needs: needs:
- install-frontend - install-frontend
@@ -114,8 +113,7 @@ test-frontend:
- frontend/node_modules/ - frontend/node_modules/
policy: pull policy: pull
script: script:
- cd frontend && test -d node_modules || npm ci - cd frontend && (test -d node_modules || npm ci) && CI=true npx react-scripts test --watchAll=false --ci
- cd frontend && CI=true npx react-scripts test --watchAll=false --ci
timeout: 5 minutes timeout: 5 minutes
needs: needs:
- install-frontend - install-frontend
@@ -133,8 +131,7 @@ build-frontend:
- frontend/node_modules/ - frontend/node_modules/
policy: pull policy: pull
script: script:
- cd frontend && test -d node_modules || npm ci - cd frontend && (test -d node_modules || npm ci) && CI=false REACT_APP_API_BASE=/api REACT_APP_API_HOST="" npm run build
- cd frontend && CI=false REACT_APP_API_BASE=/api REACT_APP_API_HOST="" npm run build
artifacts: artifacts:
paths: paths:
- frontend/build/ - frontend/build/