From dbc0dca591855cf9065cae1a27aaa91a89813e64 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 23 Feb 2023 11:10:11 +0000 Subject: [PATCH] Manually finalize Percy builds (#10220) --- .editorconfig | 2 +- .github/workflows/cypress.yaml | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index 56631484cd..98ebc4dc8f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -23,4 +23,4 @@ indent_size = 4 trim_trailing_whitespace = true [*.{yml,yaml}] -indent_size = 2 +indent_size = 4 diff --git a/.github/workflows/cypress.yaml b/.github/workflows/cypress.yaml index 26f4a1dcd6..6c62d9997d 100644 --- a/.github/workflows/cypress.yaml +++ b/.github/workflows/cypress.yaml @@ -165,8 +165,9 @@ jobs: PERCY_BRANCH: ${{ github.event.workflow_run.head_branch }} PERCY_COMMIT: ${{ github.event.workflow_run.head_sha }} PERCY_PULL_REQUEST: ${{ needs.prepare.outputs.pr_id }} - PERCY_PARALLEL_TOTAL: ${{ strategy.job-total }} PERCY_PARALLEL_NONCE: ${{ needs.prepare.outputs.uuid }} + # We manually finalize the build in the report stage + PERCY_PARALLEL_TOTAL: -1 - name: Upload Artifact if: failure() @@ -184,14 +185,23 @@ jobs: with: name: cypress-junit path: cypress/results + report: name: Report results - needs: tests + needs: + - prepare + - tests runs-on: ubuntu-latest if: always() permissions: statuses: write steps: + - name: Finalize Percy + if: needs.prepare.outputs.percy_enable == '1' + run: npx -p @percy/cli percy build:finalize + env: + PERCY_PARALLEL_NONCE: ${{ needs.prepare.outputs.uuid }} + - uses: Sibz/github-status-action@v1 with: authToken: ${{ secrets.GITHUB_TOKEN }} @@ -199,6 +209,7 @@ jobs: context: ${{ github.workflow }} / cypress (${{ github.event.workflow_run.event }} => ${{ github.event_name }}) sha: ${{ github.event.workflow_run.head_sha }} target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + testrail: name: Report results to testrail needs: