@@ -329,13 +329,13 @@ commands:
329329 cd packages/functional-tests/tests
330330 TEST_FILES=$(circleci tests glob "./**/*.spec.ts")
331331 cd ..
332- echo $TEST_FILES | circleci tests run --command="xargs yarn playwright test --project=<< parameters.project >> $GREP" --verbose --split-by=timings --timings-type=classname
332+ echo $TEST_FILES | circleci tests run \
333+ --command="xargs yarn playwright test --project=<< parameters.project >> $GREP" \
334+ --verbose \
335+ --split-by=timings \
336+ --timings-type=classname
333337 environment :
334338 NODE_OPTIONS : --dns-result-order=ipv4first
335- JEST_JUNIT_OUTPUT_DIR : ./artifacts/tests
336- JEST_JUNIT_ADD_FILE_ATTRIBUTE : true
337- PLAYWRIGHT_BLOB_OUTPUT_DIR : ./artifacts/blob-report
338- PW_TEST_HTML_REPORT_OPEN : never
339339 ACCOUNTS_DOMAIN : << pipeline.parameters.accounts-domain >>
340340 PAYMENTS_DOMAIN : << pipeline.parameters.payments-domain >>
341341 ACCOUNTS_API_DOMAIN : << pipeline.parameters.accounts-api-domain >>
@@ -355,13 +355,13 @@ commands:
355355 cd packages/functional-tests/tests
356356 TEST_FILES=$(circleci tests glob "./**/*.spec.ts")
357357 cd ..
358- echo $TEST_FILES | circleci tests run --command="xargs yarn playwright test --project=<< parameters.project >>-chromium $GREP" --verbose --split-by=timings --timings-type=classname
358+ echo $TEST_FILES | circleci tests run \
359+ --command="xargs yarn playwright test --project=<< parameters.project >> $GREP" \
360+ --verbose \
361+ --split-by=timings \
362+ --timings-type=classname
359363 environment :
360364 NODE_OPTIONS : --dns-result-order=ipv4first
361- JEST_JUNIT_OUTPUT_DIR : ./artifacts/tests
362- JEST_JUNIT_ADD_FILE_ATTRIBUTE : true
363- PLAYWRIGHT_BLOB_OUTPUT_DIR : ./artifacts/blob-report
364- PW_TEST_HTML_REPORT_OPEN : never
365365 ACCOUNTS_DOMAIN : << pipeline.parameters.accounts-domain >>
366366 PAYMENTS_DOMAIN : << pipeline.parameters.payments-domain >>
367367 ACCOUNTS_API_DOMAIN : << pipeline.parameters.accounts-api-domain >>
@@ -387,62 +387,6 @@ commands:
387387 path : artifacts/tests
388388 when : always
389389
390- rename-reports :
391- steps :
392- - run :
393- name : Rename Reports
394- command : |
395- mkdir -p artifacts/blob-report && mkdir -p artifacts/playwright-report
396- echo "Starting rename reports step"
397- cd artifacts/blob-report || { echo "Directory artifacts/blob-report not found"; exit 1; }
398- echo "Current directory: $(pwd)"
399- echo "Listing contents before renaming:"
400- ls -la
401- if [ -f report.zip ]; then
402- mv report.zip reports-${CIRCLE_NODE_INDEX}-firefox.zip
403- echo "Renamed report.zip to reports-${CIRCLE_NODE_INDEX}-firefox.zip"
404- else
405- echo "No report.zip found, skipping rename for this node."
406- fi
407- echo "$CIRCLE_WORKFLOW_JOB_ID" > job_id_firefox.txt
408- echo "Listing contents after renaming:"
409- ls -la
410- when : always
411- - store_artifacts :
412- path : artifacts/blob-report
413- - persist_to_workspace :
414- root : /home/circleci/project
415- paths :
416- - artifacts/blob-report
417-
418- rename-reports-chromium :
419- steps :
420- - run :
421- name : Rename Reports
422- command : |
423- mkdir -p artifacts/blob-report && mkdir -p artifacts/playwright-report
424- echo "Starting rename reports step"
425- cd artifacts/blob-report || { echo "Directory artifacts/blob-report not found"; exit 1; }
426- echo "Current directory: $(pwd)"
427- echo "Listing contents before renaming:"
428- ls -la
429- if [ -f report.zip ]; then
430- mv report.zip reports-${CIRCLE_NODE_INDEX}-chromium.zip
431- echo "Renamed report.zip to reports-${CIRCLE_NODE_INDEX}-chromium.zip"
432- else
433- echo "No report.zip found, skipping rename for this node."
434- fi
435- echo "$CIRCLE_WORKFLOW_JOB_ID" > job_id_chromium.txt
436- echo "Listing contents after renaming:"
437- ls -la
438- when : always
439- - store_artifacts :
440- path : artifacts/blob-report
441- - persist_to_workspace :
442- root : /home/circleci/project
443- paths :
444- - artifacts/blob-report
445-
446390 build :
447391 steps :
448392 - run :
@@ -758,7 +702,6 @@ jobs:
758702 - run-playwright-tests :
759703 project : << parameters.project >>
760704 - store-artifacts
761- - rename-reports
762705
763706 # Runs functional tests using playwright. These tests support splitting
764707 # and parallel execution.
@@ -786,7 +729,6 @@ jobs:
786729 - run-playwright-tests :
787730 project : local
788731 - store-artifacts
789- - rename-reports
790732
791733 playwright-functional-tests-chromium :
792734 parameters :
@@ -812,101 +754,6 @@ jobs:
812754 - run-playwright-tests-chromium :
813755 project : local
814756 - store-artifacts
815- - rename-reports-chromium
816-
817- # Currently HTML reports are being generated for Firefox tests only hence we are only using firefox functional test job id below
818- check-required-jobs-complete :
819- docker :
820- - image : circleci/node
821- resource_class : small
822- steps :
823- - run :
824- name : Wait for required jobs to complete
825- command : |
826- sleep 30
827- mkdir -p artifacts/blob-report
828- while true; do
829- RESPONSE=$(curl -s --request GET "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" --header "Circle-Token: $CCI_Token")
830- FUNCTIONAL_TEST_JOB_ID=$(echo $RESPONSE | jq -r '.items[] | select(.status == "running") | select(.name | startswith("Firefox Functional Tests")) | .id')
831- if [[ -e artifacts/blob-report/functional_test_job_id.txt ]]; then
832- echo "Job id already set"
833- elif [[ -n "$FUNCTIONAL_TEST_JOB_ID" ]]; then
834- echo "Storing job id, $FUNCTIONAL_TEST_JOB_ID, for later lookup."
835- echo $FUNCTIONAL_TEST_JOB_ID > artifacts/blob-report/functional_test_job_id.txt
836- else
837- echo "No job id located. ($FUNCTIONAL_TEST_JOB_ID)"
838- fi
839- JOB_STATUS=$(echo $RESPONSE | jq -r '.items[] | .name + "-" + .status')
840- echo "ALL JOB_STATUS:"
841- echo $JOB_STATUS
842- PENDING=$(echo $RESPONSE | jq -r '.items[] | select(.status == "blocked" or .status == "running" or .status == "not_running") | select(.name | startswith("Tests Complete") | not) |
843- select(.name | startswith("Merge Playwright Reports") | not) |
844- select(.name | startswith("Deploy Storybooks") | not) |
845- select(.name | startswith("Create FxA Image") | not) |
846- select(.name | startswith("Deploy FxA Image") | not) |
847- select(.name | startswith("Deploy CI Images") | not) |
848- select(.name | startswith("Check all required jobs are complete") | not ) | .name')
849- echo "PENDING JOBS OF INTEREST:"
850- echo $PENDING
851- if [[ -z "$PENDING" ]]; then
852- echo "All required jobs have now completed"
853- exit 0
854- else
855- echo "Still waiting for jobs to complete..."
856- sleep 1
857- fi
858- done
859- - persist_to_workspace :
860- root : /home/circleci/project
861- paths :
862- - artifacts/blob-report
863- when : always
864-
865- playwright-functional-test-report :
866- executor : default-executor
867- steps :
868- - attach_workspace :
869- at : /home/circleci/project
870- - run :
871- name : Merge blob Reports
872- command : |
873- cd artifacts/blob-report
874- JOB_ID=$(cat functional_test_job_id.txt)
875- echo "Fetching reports from circle ci artifact storarge for $JOB_ID"
876- function fetch_report() {
877- echo "Fetching reports-$1-firefox.zip"
878- wget https://output.circle-artifacts.com/output/job/${JOB_ID}/artifacts/$1/artifacts/blob-report/reports-$1-firefox.zip
879- wgetreturn=$?
880- if [[ $wgetreturn -ne 0 ]]; then
881- echo "Failed to get reports-$1-firefox.zip"
882- fi
883- }
884- for i in $(seq 0 7); do
885- fetch_report $i
886- done
887-
888- echo "Fetched all reports"
889-
890- if ls *.zip 1> /dev/null 2>&1; then
891- echo "Merging blob reports"
892- npx playwright merge-reports --reporter=blob .
893- else
894- echo "No report zip files found, skipping merge."
895- fi
896- - store_artifacts :
897- path : artifacts/blob-report
898- - run :
899- name : Merge HTML Reports
900- command : |
901- cd artifacts/blob-report
902- if ls *.zip 1> /dev/null 2>&1; then
903- echo "Merging HTML reports"
904- npx playwright merge-reports --reporter=html .
905- else
906- echo "No report zip files found, skipping merge."
907- fi
908- - store_artifacts :
909- path : playwright-report
910757
911758 build-and-deploy-storybooks :
912759 executor : default-executor
@@ -1015,18 +862,10 @@ workflows:
1015862 projects : --exclude '*,!tag:scope:shared:*'
1016863 requires :
1017864 - Build (PR)
1018- - check-required-jobs-complete :
1019- name : Check all required jobs are complete (PR)
1020- requires :
1021- - Build (PR)
1022865 - playwright-functional-tests :
1023866 name : Firefox Functional Tests - Playwright (PR)
1024867 requires :
1025868 - Build (PR)
1026- - playwright-functional-test-report :
1027- name : Merge Playwright Reports (PR)
1028- requires :
1029- - Check all required jobs are complete (PR)
1030869 - build-and-deploy-storybooks :
1031870 name : Deploy Storybooks (PR)
1032871 requires :
@@ -1046,7 +885,6 @@ workflows:
1046885 - Integration Test - Libraries (PR)
1047886 - Firefox Functional Tests - Playwright (PR)
1048887 - Deploy Storybooks (PR)
1049- - Check all required jobs are complete (PR)
1050888
1051889 # Triggered remotely. See .circleci/README.md
1052890 production_smoke_tests :
@@ -1348,18 +1186,10 @@ workflows:
13481186 projects : --exclude '*,!tag:scope:shared:*'
13491187 requires :
13501188 - Build (nightly)
1351- - check-required-jobs-complete :
1352- name : Check all required jobs are complete (nightly)
1353- requires :
1354- - Build (nightly)
13551189 - playwright-functional-tests :
13561190 name : Firefox Functional Tests - Playwright (nightly)
13571191 requires :
13581192 - Build (nightly)
1359- - playwright-functional-test-report :
1360- name : Merge Playwright Reports (nightly)
1361- requires :
1362- - Check all required jobs are complete (nightly)
13631193 - on-complete :
13641194 name : Tests Complete (nightly)
13651195 stage : Tests (nightly)
@@ -1374,7 +1204,6 @@ workflows:
13741204 - Integration Test - Servers - Auth V2 (nightly)
13751205 - Integration Test - Libraries (nightly)
13761206 - Firefox Functional Tests - Playwright (nightly)
1377- - Check all required jobs are complete (nightly)
13781207 - build-and-deploy-storybooks :
13791208 name : Deploy Storybooks (nightly)
13801209 requires :
0 commit comments