From 7bd99c36304a46898e1d44119c89b44d7191fbb1 Mon Sep 17 00:00:00 2001 From: Karolina Rakoczy Date: Sat, 4 Jan 2025 16:23:13 +0100 Subject: [PATCH 1/2] Add password to artifact --- .github/actions/merge-pw-reports/action.yml | 15 ++++++++++++--- .github/workflows/pr-automation.yml | 4 +++- .github/workflows/run-test-manual.yml | 2 ++ .github/workflows/run-tests-on-release.yml | 2 ++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/actions/merge-pw-reports/action.yml b/.github/actions/merge-pw-reports/action.yml index 46f2b1b56c..4942fde1a7 100644 --- a/.github/actions/merge-pw-reports/action.yml +++ b/.github/actions/merge-pw-reports/action.yml @@ -1,6 +1,11 @@ name: Merge playwright reports description: Merge reports from all shards +inputs: + PASSWORD_FOR_DECODING_ARTIFACT: + description: "Password for decoding artifact" + required: true + runs: using: "composite" steps: @@ -21,11 +26,15 @@ runs: - name: Merge into HTML Report shell: bash - run: npx playwright merge-reports --reporter html ./all-blob-reports + env: + PASSWORD_FOR_DECODING_ARTIFACT: ${{ inputs.PASSWORD_FOR_DECODING_ARTIFACT }} + run: | + npx playwright merge-reports --reporter html ./all-blob-reports + zip -P $PASSWORD_FOR_DECODING_ARTIFACT secure-report.zip -r ./playwright-report - name: Upload HTML report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: html-report--attempt-${{ github.run_attempt }} - path: playwright-report + path: secure-report.zip retention-days: 14 diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml index 484228d5d8..0929075a69 100644 --- a/.github/workflows/pr-automation.yml +++ b/.github/workflows/pr-automation.yml @@ -201,4 +201,6 @@ jobs: - uses: actions/checkout@v4 - name: Merge playwright reports - uses: ./.github/actions/merge-pw-reports \ No newline at end of file + uses: ./.github/actions/merge-pw-reports + with: + PASSWORD_FOR_DECODING_ARTIFACT: ${{ secrets.E2E_USER_PASSWORD }} diff --git a/.github/workflows/run-test-manual.yml b/.github/workflows/run-test-manual.yml index dbd318a1c2..077fba4c90 100644 --- a/.github/workflows/run-test-manual.yml +++ b/.github/workflows/run-test-manual.yml @@ -140,6 +140,8 @@ jobs: - name: Merge playwright reports uses: ./.github/actions/merge-pw-reports + with: + PASSWORD_FOR_DECODING_ARTIFACT: ${{ secrets.E2E_USER_PASSWORD }} - name: complete testmo report uses: ./.github/actions/testmo/testmo-finish diff --git a/.github/workflows/run-tests-on-release.yml b/.github/workflows/run-tests-on-release.yml index 9a5757dfc9..e8ee13708a 100644 --- a/.github/workflows/run-tests-on-release.yml +++ b/.github/workflows/run-tests-on-release.yml @@ -285,6 +285,8 @@ jobs: - name: Merge playwright reports if: needs.add-check-and-prepare-instance.outputs.FRAMEWORK == '"playwright"' uses: ./.github/actions/merge-pw-reports + with: + PASSWORD_FOR_DECODING_ARTIFACT: ${{ secrets.E2E_USER_PASSWORD }} - name: Merge cypress reports if: needs.add-check-and-prepare-instance.outputs.FRAMEWORK == '"cypress"' From 45a79f8667470a15c7b946b90456b7f217081019 Mon Sep 17 00:00:00 2001 From: Karolina Rakoczy Date: Fri, 10 Jan 2025 10:48:03 +0100 Subject: [PATCH 2/2] Add changeset --- .changeset/wicked-llamas-do.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wicked-llamas-do.md diff --git a/.changeset/wicked-llamas-do.md b/.changeset/wicked-llamas-do.md new file mode 100644 index 0000000000..8bfaee1b3a --- /dev/null +++ b/.changeset/wicked-llamas-do.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Tests reports from artifacts will be protected by password