From 5d08ff245db66ac92803171d279331f985447628 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 12 Sep 2025 11:21:39 +0200 Subject: [PATCH] Enhance CircleCI configuration to support separate workflows for unit and story tests. Added steps to run story tests and store results, ensuring better test organization and reporting. --- .circleci/config.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c415488f3ae..de37dcb620e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -852,7 +852,27 @@ jobs: - run: command: | cd code - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + name: Run tests + - store_test_results: + path: test-results + - report-workflow-on-failure + - cancel-workflow-on-failure + stories-tests: + executor: + class: xlarge + name: sb_playwright + parallelism: 2 + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + cd code + TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose name: Run tests - store_test_results: @@ -936,6 +956,9 @@ workflows: - unit-tests: requires: - build + - stories-tests: + requires: + - build - script-checks: requires: - build @@ -1022,6 +1045,9 @@ workflows: - unit-tests: requires: - build + - stories-tests: + requires: + - build - script-checks: requires: - build @@ -1092,6 +1118,9 @@ workflows: - unit-tests: requires: - build + - stories-tests: + requires: + - build - script-checks: requires: - build