From 7bd99c36304a46898e1d44119c89b44d7191fbb1 Mon Sep 17 00:00:00 2001 From: Karolina Rakoczy Date: Sat, 4 Jan 2025 16:23:13 +0100 Subject: [PATCH] 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 46f2b1b56c7..4942fde1a76 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 484228d5d86..0929075a69f 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 dbd318a1c24..077fba4c909 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 9a5757dfc90..e8ee13708a7 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"'