diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c7c9b9..f39a7d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -105,8 +105,8 @@ test-backend: - npm ci --prefer-offline # Source backend .env from the production install so DATABASE_URL is available # for integration tests. Safe because the runner is on the same machine as the DB. - - set -a && source /home/cve-dashboard/backend/.env && set +a - - ./node_modules/.bin/jest --ci --forceExit backend/__tests__/ + # Must be on same line as jest because each script line is a separate shell context. + - export $(grep -v '^#' /home/cve-dashboard/backend/.env | xargs) && ./node_modules/.bin/jest --ci --forceExit backend/__tests__/ timeout: 5 minutes needs: - install-backend