From 2ec9cf436a043292aa25bd348328c53ba8713328 Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Thu, 21 Nov 2024 14:44:34 +0300 Subject: [PATCH 1/3] chore: try fix deploy report on main branch --- .github/workflows/ci.yml | 90 ++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2c57d5ca..53ce05195 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,6 +120,51 @@ jobs: echo "flaky=$flaky" >> $GITHUB_OUTPUT echo "skipped=$skipped" >> $GITHUB_OUTPUT + deploy_report: + name: Deploy Test Report + needs: [e2e_tests] + if: ${{always() && (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}} + runs-on: ubuntu-latest + permissions: + contents: write + pages: write + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Fetch gh-pages branch + run: | + git fetch origin gh-pages:gh-pages + mkdir gh-pages + git --work-tree=gh-pages checkout gh-pages -- . + + - name: Download Playwright artifacts + uses: actions/download-artifact@v3 + with: + name: playwright-artifacts + path: playwright-artifacts + + - name: Copy new report + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + REPORT_DIR="${{ github.event.pull_request.number }}" + else + REPORT_DIR="main" + fi + rm -rf gh-pages/$REPORT_DIR + mkdir -p gh-pages/$REPORT_DIR + cp -r playwright-artifacts/playwright-report/* gh-pages/$REPORT_DIR/ + + - name: Deploy report to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: gh-pages + destination_dir: . + force_orphan: true + bundle_size: name: Check Bundle Size runs-on: ubuntu-latest @@ -183,51 +228,6 @@ jobs: echo "diff=$diff" >> $GITHUB_OUTPUT echo "percent=$percent" >> $GITHUB_OUTPUT - deploy_report: - name: Deploy Test Report - needs: [e2e_tests] - if: ${{always() && (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}} - runs-on: ubuntu-latest - permissions: - contents: write - pages: write - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Fetch gh-pages branch - run: | - git fetch origin gh-pages:gh-pages - mkdir gh-pages - git --work-tree=gh-pages checkout gh-pages -- . - - - name: Download Playwright artifacts - uses: actions/download-artifact@v3 - with: - name: playwright-artifacts - path: playwright-artifacts - - - name: Copy new report - run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - REPORT_DIR="${{ github.event.pull_request.number }}" - else - REPORT_DIR="main" - fi - rm -rf gh-pages/$REPORT_DIR - mkdir -p gh-pages/$REPORT_DIR - cp -r playwright-artifacts/playwright-report/* gh-pages/$REPORT_DIR/ - - - name: Deploy report to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: gh-pages - destination_dir: . - force_orphan: true - update_pr: name: Update PR Description needs: [e2e_tests, bundle_size] From 2647582969e0ecab11e7bb0c0713b82d7972b42d Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Thu, 21 Nov 2024 14:50:35 +0300 Subject: [PATCH 2/3] Revert "chore: try fix deploy report on main branch" This reverts commit 2ec9cf436a043292aa25bd348328c53ba8713328. --- .github/workflows/ci.yml | 90 ++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53ce05195..d2c57d5ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,51 +120,6 @@ jobs: echo "flaky=$flaky" >> $GITHUB_OUTPUT echo "skipped=$skipped" >> $GITHUB_OUTPUT - deploy_report: - name: Deploy Test Report - needs: [e2e_tests] - if: ${{always() && (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}} - runs-on: ubuntu-latest - permissions: - contents: write - pages: write - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Fetch gh-pages branch - run: | - git fetch origin gh-pages:gh-pages - mkdir gh-pages - git --work-tree=gh-pages checkout gh-pages -- . - - - name: Download Playwright artifacts - uses: actions/download-artifact@v3 - with: - name: playwright-artifacts - path: playwright-artifacts - - - name: Copy new report - run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - REPORT_DIR="${{ github.event.pull_request.number }}" - else - REPORT_DIR="main" - fi - rm -rf gh-pages/$REPORT_DIR - mkdir -p gh-pages/$REPORT_DIR - cp -r playwright-artifacts/playwright-report/* gh-pages/$REPORT_DIR/ - - - name: Deploy report to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: gh-pages - destination_dir: . - force_orphan: true - bundle_size: name: Check Bundle Size runs-on: ubuntu-latest @@ -228,6 +183,51 @@ jobs: echo "diff=$diff" >> $GITHUB_OUTPUT echo "percent=$percent" >> $GITHUB_OUTPUT + deploy_report: + name: Deploy Test Report + needs: [e2e_tests] + if: ${{always() && (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}} + runs-on: ubuntu-latest + permissions: + contents: write + pages: write + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Fetch gh-pages branch + run: | + git fetch origin gh-pages:gh-pages + mkdir gh-pages + git --work-tree=gh-pages checkout gh-pages -- . + + - name: Download Playwright artifacts + uses: actions/download-artifact@v3 + with: + name: playwright-artifacts + path: playwright-artifacts + + - name: Copy new report + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + REPORT_DIR="${{ github.event.pull_request.number }}" + else + REPORT_DIR="main" + fi + rm -rf gh-pages/$REPORT_DIR + mkdir -p gh-pages/$REPORT_DIR + cp -r playwright-artifacts/playwright-report/* gh-pages/$REPORT_DIR/ + + - name: Deploy report to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: gh-pages + destination_dir: . + force_orphan: true + update_pr: name: Update PR Description needs: [e2e_tests, bundle_size] From b44248722ca3e56a33e1abc65fc59a34e5bc6f70 Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Thu, 21 Nov 2024 14:51:43 +0300 Subject: [PATCH 3/3] fix: test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2c57d5ca..5390bb344 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -186,7 +186,7 @@ jobs: deploy_report: name: Deploy Test Report needs: [e2e_tests] - if: ${{always() && (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}} + if: ${{always() && (github.ref == 'refs/heads/test-report' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}} runs-on: ubuntu-latest permissions: contents: write