Skip to content

Commit

Permalink
Fix www tests not running in prod (#18593)
Browse files Browse the repository at this point in the history
I made a mistake when setting these up a while ago. Setting the NODE_ENV
in the CircleCI config doesn't work because it's also set in the node
script command.

The number of test commands is getting out of control. Might need to fix
it at some point. Not today for me.
  • Loading branch information
acdlite committed Apr 13, 2020
1 parent bec7599 commit f3f3d77
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
RELEASE_CHANNEL: stable
command: yarn test-www-variant --maxWorkers=2

RELEASE_CHANNEL_stable_NODE_ENV_production_yarn_test_www:
RELEASE_CHANNEL_stable_yarn_test_prod_www:
docker: *docker
environment: *environment
steps:
Expand All @@ -147,11 +147,10 @@ jobs:
- *run_yarn
- run:
environment:
NODE_ENV: production
RELEASE_CHANNEL: stable
command: yarn test-www --maxWorkers=2
command: yarn test-prod-www --maxWorkers=2

RELEASE_CHANNEL_stable_NODE_ENV_production_yarn_test_www_variant:
RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
docker: *docker
environment: *environment
steps:
Expand All @@ -160,9 +159,8 @@ jobs:
- *run_yarn
- run:
environment:
NODE_ENV: production
RELEASE_CHANNEL: stable
command: yarn test-www-variant --maxWorkers=2
command: yarn test-prod-www-variant --maxWorkers=2

yarn_test_www:
docker: *docker
Expand All @@ -188,7 +186,7 @@ jobs:
RELEASE_CHANNEL: experimental
command: yarn test-www-variant --maxWorkers=2

NODE_ENV_production_yarn_test_www:
yarn_test_prod_www:
docker: *docker
environment: *environment
steps:
Expand All @@ -197,11 +195,10 @@ jobs:
- *run_yarn
- run:
environment:
NODE_ENV: production
RELEASE_CHANNEL: experimental
command: yarn test-www --maxWorkers=2
command: yarn test-prod-www --maxWorkers=2

NODE_ENV_production_yarn_test_www_variant:
yarn_test_prod_www_variant:
docker: *docker
environment: *environment
steps:
Expand All @@ -210,7 +207,6 @@ jobs:
- *run_yarn
- run:
environment:
NODE_ENV: production
RELEASE_CHANNEL: experimental
command: yarn test-www-variant --maxWorkers=2

Expand Down Expand Up @@ -489,10 +485,10 @@ workflows:
- RELEASE_CHANNEL_stable_yarn_test_www_variant:
requires:
- setup
- RELEASE_CHANNEL_stable_NODE_ENV_production_yarn_test_www:
- RELEASE_CHANNEL_stable_yarn_test_prod_www:
requires:
- setup
- RELEASE_CHANNEL_stable_NODE_ENV_production_yarn_test_www_variant:
- RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
requires:
- setup
- RELEASE_CHANNEL_stable_yarn_build:
Expand Down Expand Up @@ -532,10 +528,10 @@ workflows:
- yarn_test_www_variant:
requires:
- setup
- NODE_ENV_production_yarn_test_www:
- yarn_test_prod_www:
requires:
- setup
- NODE_ENV_production_yarn_test_www_variant:
- yarn_test_prod_www_variant:
requires:
- setup
- yarn_build:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
"test": "cross-env NODE_ENV=development jest --config ./scripts/jest/config.source.js",
"test-www": "cross-env NODE_ENV=development jest --config ./scripts/jest/config.source-www.js",
"test-www-variant": "cross-env NODE_ENV=development VARIANT=true jest --config ./scripts/jest/config.source-www.js",
"test-prod-www": "cross-env NODE_ENV=production jest --config ./scripts/jest/config.source-www.js",
"test-prod-www-variant": "cross-env NODE_ENV=production VARIANT=true jest --config ./scripts/jest/config.source-www.js",
"test-persistent": "cross-env NODE_ENV=development jest --config ./scripts/jest/config.source-persistent.js",
"debug-test-persistent": "cross-env NODE_ENV=development node --inspect-brk node_modules/jest/bin/jest.js --config ./scripts/jest/config.source-persistent.js --runInBand",
"test-prod": "cross-env NODE_ENV=production jest --config ./scripts/jest/config.source.js",
Expand Down

0 comments on commit f3f3d77

Please sign in to comment.