@@ -56,6 +56,7 @@ windows_medium: &windows_medium
5656 name : win/server-2022
5757 shell : bash.exe
5858 size : medium
59+ version : " 2023.05.1"
5960 parameters :
6061 node_version :
6162 type : string
@@ -181,7 +182,8 @@ jobs:
181182 path : test-logs.txt
182183 destination : test-logs
183184 test_jest_windows_with_docker :
184- << : *windows_big
185+ << : *windows_medium
186+ parallelism : 2 # Run tests across 2 containers
185187 steps :
186188 - checkout
187189 - install_node_npm :
@@ -198,6 +200,7 @@ jobs:
198200 - save_cache :
199201 key : v1-win-dependencies-{{ checksum "package.json" }}
200202 paths :
203+ - node_modules
201204 - .npm-cache
202205
203206 - run : docker version
@@ -222,7 +225,8 @@ jobs:
222225 - run :
223226 name : Run Windows tests in parallel
224227 command : |
225- npm run test-jest-windows
228+ TEST=$(circleci tests glob "test/windows/**/*.spec.ts" | circleci tests split --split-by=timings | sed 's#\\\\#/#g')
229+ npm run test-jest-windows -- $TEST --reporters=default --reporters=jest-junit
226230 environment :
227231 JEST_JUNIT_OUTPUT_DIR : ' ./reports/junit'
228232 JEST_JUNIT_ADD_FILE_ATTRIBUTE : ' true' # We need this to make --split-by=timings work
@@ -240,7 +244,8 @@ jobs:
240244 paths :
241245 - C:\docker-cache
242246 test_jest_windows_no_docker :
243- << : *windows_big
247+ << : *windows_medium
248+ parallelism : 2 # Run tests across 2 containers
244249 steps :
245250 - checkout
246251 - install_node_npm :
@@ -257,6 +262,7 @@ jobs:
257262 - save_cache :
258263 key : v1-win-dependencies-{{ checksum "package.json" }}
259264 paths :
265+ - node_modules
260266 - .npm-cache
261267 # make docker appear to be broken.
262268 - run : " function docker() { return 1; }"
@@ -266,15 +272,8 @@ jobs:
266272 - run :
267273 name : Run Windows tests in parallel
268274 command : |
269- echo "====Before===="
270- ls ${TMPDIR:-/tmp}
271- echo "==============="
272-
273- npm run test-jest-windows
274-
275- echo "====After===="
276- ls ${TMPDIR:-/tmp}
277- echo "==============="
275+ TEST=$(circleci tests glob "test/windows/**/*.spec.ts" | circleci tests split --split-by=timings | sed 's#\\\\#/#g')
276+ npm run test-jest-windows -- $TEST --reporters=default --reporters=jest-junit
278277 environment :
279278 JEST_JUNIT_OUTPUT_DIR : ' ./reports/junit'
280279 JEST_JUNIT_ADD_FILE_ATTRIBUTE : ' true' # We need this to make --split-by=timings work
@@ -298,13 +297,13 @@ jobs:
298297 echo $CLI_COMMIT_HASH >> /tmp/cli-version
299298 - restore_cache :
300299 keys :
301- - v1-cli-repo-g- {{ checksum "/tmp/cli-version" }}
302- - v1-cli-repo-g-
300+ - v1-cli-repo-{{ checksum "/tmp/cli-version" }}
301+ - v1-cli-repo-
303302 - run :
304303 name : Build Snyk CLI with latest changes
305304 command : ./.circleci/build-cli.sh
306305 - save_cache :
307- key : v1-cli-repo-g- {{ checksum "/tmp/cli-version" }}
306+ key : v1-cli-repo-{{ checksum "/tmp/cli-version" }}
308307 paths :
309308 - ~/cli
310309 build_and_test_latest_go_binary :
@@ -384,8 +383,8 @@ workflows:
384383 - nodejs-install
385384 - snyk-bot-slack
386385 node_version : *windows_node_version
387- requires :
388- - Install, Lint, and Build
386+ # requires:
387+ # - Install, Lint, and Build
389388 post-steps :
390389 - *slack-fail-notify
391390 - build_cli :
0 commit comments