Skip to content

Commit aeb5f80

Browse files
committed
ci: add test for pr-check workflows
1 parent 852f17e commit aeb5f80

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.circleci/config.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ version: 2.1
33
defaults: &defaults
44
working_directory: ~/repo
55
docker:
6-
- image: cimg/node:16.15.1
6+
# Jest has issues with node > 16.11.0, please stick node version until the issues are resolved
7+
# https://github.com/facebook/jest/issues/11956
8+
- image: cimg/node:16.10.0
79

810
set_env: &set_env
911
name: Setup Environment Variables
@@ -14,6 +16,7 @@ set_env: &set_env
1416
source $BASH_ENV
1517
echo "export CIRCLE_PR_BASE_SHA=`curl -s https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.sha'`" >> $BASH_ENV
1618
echo 'export AFFECTED_ARGS="--base=${CIRCLE_PR_BASE_SHA}"' >> $BASH_ENV
19+
echo 'export NODE_OPTIONS="--max_old_space_size=6144"' >> $BASH_ENV
1720
1821
source $BASH_ENV
1922
echo $AFFECTED_ARGS
@@ -53,6 +56,16 @@ jobs:
5356
- run: yarn nx workspace-lint
5457
- run: yarn nx affected --target=lint --head=HEAD --maxWarnings=0 ${AFFECTED_ARGS}
5558

59+
test:
60+
<<: *defaults
61+
steps:
62+
- checkout
63+
- run:
64+
<<: *set_env
65+
- restore_cache:
66+
<<: *yarn_cache
67+
- run: yarn nx affected --target=test --head=HEAD --ci --code-coverage --maxWorkers=2 ${AFFECTED_ARGS}
68+
5669
workflows:
5770
version: 2
5871
pr-check:
@@ -61,3 +74,6 @@ workflows:
6174
- lint:
6275
requires:
6376
- install
77+
- test:
78+
requires:
79+
- install

0 commit comments

Comments
 (0)