From 0ae0170b029fd9badde5fa119facc393c5789f0d Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Tue, 26 Mar 2024 09:59:14 -0700 Subject: [PATCH] Add playwright report task (#7946) --- .circleci/src/@continue_config.yml | 1 + .../src/jobs/@create-audius-app-jobs.yml | 3 +- .circleci/src/jobs/@web-jobs.yml | 31 +++++++++++++++++-- .circleci/src/workflows/web.yml | 8 ++++- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.circleci/src/@continue_config.yml b/.circleci/src/@continue_config.yml index 0ba7c50081e..7212643f7c2 100644 --- a/.circleci/src/@continue_config.yml +++ b/.circleci/src/@continue_config.yml @@ -7,6 +7,7 @@ orbs: ruby: circleci/ruby@1.2.0 browser-tools: circleci/browser-tools@1.4.4 newman: postman/newman@1.0.0 + swissknife: roopakv/swissknife@0.69.0 # the default pipeline parameters, which will be updated according to # the results of the path-filtering orb in config.yml diff --git a/.circleci/src/jobs/@create-audius-app-jobs.yml b/.circleci/src/jobs/@create-audius-app-jobs.yml index 83b2ca4ca5c..22fc2e44e85 100644 --- a/.circleci/src/jobs/@create-audius-app-jobs.yml +++ b/.circleci/src/jobs/@create-audius-app-jobs.yml @@ -40,7 +40,8 @@ create-audius-app-test: create-audius-app-test-e2e: working_directory: ~/audius-protocol resource_class: medium - executor: cypress/default + docker: + - image: cimg/node:18.17 steps: - checkout - attach_workspace: diff --git a/.circleci/src/jobs/@web-jobs.yml b/.circleci/src/jobs/@web-jobs.yml index 42131dfff46..78fd8ad3438 100644 --- a/.circleci/src/jobs/@web-jobs.yml +++ b/.circleci/src/jobs/@web-jobs.yml @@ -105,11 +105,38 @@ playwright-tests: - store_test_results: path: packages/web/report.xml when: always - - store_artifacts: - path: packages/web/playwright-report - store_artifacts: path: packages/web/blob-report +playwright-tests-report: + working_directory: ~/audius-protocol + docker: + - image: cimg/node:18.17 + steps: + - swissknife/wait_for_job: + job-name: playwright-tests + - swissknife/get-job-number: + job-name: playwright-tests + - swissknife/get_job_artifacts: + job-number: SK_JOB_NUM + file-name-pattern: packages/web/blob-report/report-1.zip + save-to-directory: ./blob-report + - swissknife/get_job_artifacts: + job-number: SK_JOB_NUM + file-name-pattern: packages/web/blob-report/report-2.zip + save-to-directory: ./blob-report + - swissknife/get_job_artifacts: + job-number: SK_JOB_NUM + file-name-pattern: packages/web/blob-report/report-3.zip + save-to-directory: ./blob-report + - swissknife/get_job_artifacts: + job-number: SK_JOB_NUM + file-name-pattern: packages/web/blob-report/report-4.zip + save-to-directory: ./blob-report + - run: npx playwright merge-reports --reporter html ./blob-report + - store_artifacts: + path: playwright-report + web-test: working_directory: ~/audius-protocol docker: diff --git a/.circleci/src/workflows/web.yml b/.circleci/src/workflows/web.yml index 08f3d470618..354c537ea71 100644 --- a/.circleci/src/workflows/web.yml +++ b/.circleci/src/workflows/web.yml @@ -57,7 +57,13 @@ jobs: - Audius Client - Probers requires: - - web-init + - web-build-staging + + - playwright-tests-report: + context: + - Probers + requires: + - web-build-staging - web-test: context: Audius Client