diff --git a/.circleci/config.yml b/.circleci/config.yml index 49c72ed0f6d..dd6e699d82d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -237,6 +237,8 @@ commands: - run: name: << parameters.label >> command: make << parameters.target >> SPEC_FILES="<< parameters.spec_files >>" + environment: + - NODE_ENV: test store_cypress_artifacts: description: Store Cypress artifacts like screenshots and videos steps: @@ -253,34 +255,34 @@ workflows: version: 2 datahub: jobs: - - lint: *ignore_ghpages - - unit_tests: *ignore_ghpages - - unit_client_tests: *ignore_ghpages + # - lint: *ignore_ghpages + # - unit_tests: *ignore_ghpages + # - unit_client_tests: *ignore_ghpages - functional_tests: *ignore_ghpages - - a11y_tests: *ignore_ghpages - - visual_tests: *ignore_ghpages - - visual_component_tests: *ignore_ghpages - - component_tests: *ignore_ghpages - - e2e_tests: - <<: *ignore_ghpages - name: e2e_tests_<< matrix.staff >> - matrix: - parameters: - staff: [da, lep] - - e2e_tests_dit: - <<: *ignore_ghpages - name: e2e_tests_dit - matrix: - parameters: - staff: [dit] - - release-storybook: - <<: *ignore_ghpages - filters: - branches: - only: - - main - - merge-and-publish-coverage: - <<: *ignore_ghpages - requires: - - functional_tests - - unit_tests + # - a11y_tests: *ignore_ghpages + # - visual_tests: *ignore_ghpages + # - visual_component_tests: *ignore_ghpages + # - component_tests: *ignore_ghpages + # - e2e_tests: + # <<: *ignore_ghpages + # name: e2e_tests_<< matrix.staff >> + # matrix: + # parameters: + # staff: [da, lep] + # - e2e_tests_dit: + # <<: *ignore_ghpages + # name: e2e_tests_dit + # matrix: + # parameters: + # staff: [dit] + # - release-storybook: + # <<: *ignore_ghpages + # filters: + # branches: + # only: + # - main + # - merge-and-publish-coverage: + # <<: *ignore_ghpages + # requires: + # - functional_tests + # - unit_tests diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 9e04e364500..95731d5a44e 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -23,7 +23,6 @@ services: # Required to test Data Hub roles in e2e tests, make sure this var # doesn't exists in your .env file as the override below won't work OAUTH2_DEV_TOKEN: ${OAUTH2_DEV_TOKEN:-ditStaffToken} - command: npm run develop - + command: bash -c 'npm run build && npm start' redis: image: redis:6.2.6 diff --git a/nodemon.json b/nodemon.json index c0257258bc9..cd62699a2b1 100644 --- a/nodemon.json +++ b/nodemon.json @@ -8,7 +8,7 @@ ], "ignore": ["*.test.js"], "env": { - "NODE_ENV": "development" + "NODE_ENV": "test" }, "ext": "js json" } diff --git a/package.json b/package.json index 89dbfd93302..90259f453ff 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "start": "node --use-strict src/server.js", "start:coverage": "nyc --silent npm run start", "build": "npm run clean && webpack", - "develop": "NODE_ENV=development npm run watch:js:client -- --env development", + "develop": "NODE_ENV=test npm run watch:js:client -- --env test", "watch:test": "npm run test:unit -- -w", "watch:js:client": "webpack --watch --progress", "watch:js:server": "nodemon $NODE_DEBUG_OPTION --inspect --ignore 'src/**/__test__/**/*'", diff --git a/webpack.config.js b/webpack.config.js index e86c216d4bf..90d4fcf8172 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,8 @@ const StartServerAfterBuild = () => { server.stdin.write('rs\n') } else { server = spawn( - "npx nodemon --inspect --ignore 'src/**/__test__/**/*'", + // "npx nodemon --inspect --ignore 'src/**/__test__/**/*'", + "npm run start:coverage", { stdio: ['pipe', 'inherit', 'inherit'], shell: true } ) } @@ -88,7 +89,8 @@ module.exports = (env) => ({ }, }, }), - env && env.development ? StartServerAfterBuild() : null, + // env && env.development ? StartServerAfterBuild() : null, + StartServerAfterBuild(), ].filter(Boolean), resolve: { modules: [