Skip to content

Commit

Permalink
👷 ci: publish report
Browse files Browse the repository at this point in the history
  • Loading branch information
jgalat committed Sep 19, 2023
1 parent e6b7013 commit 09cb8b9
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
types: [opened, reopened, synchronize, ready_for_review, closed]

jobs:
check:
runs-on: ubuntu-latest
if: ${{ contains('opened reopened synchronize ready_for_review', github.event.action) && !github.event.pull_request.merged }}
environment: Preview
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -25,8 +25,8 @@ jobs:

e2e:
needs: [check]
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
timeout-minutes: 60
if: ${{ !github.event.pull_request.draft && github.event.action != 'closed' }}
timeout-minutes: 30
runs-on: ubuntu-latest
environment: Test
env:
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:

e2e-report:
needs: [e2e]
if: ${{ always() && needs.e2e.result == 'success' }}
if: ${{ !cancelled() && !github.event.pull_request.draft && !github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -81,6 +81,22 @@ jobs:
- run: npx playwright merge-reports --reporter html ./blob-reports
- uses: actions/upload-artifact@v3
with:
name: html-report--attempt-${{ github.run_attempt }}
name: html-report
path: playwright-report
retention-days: 30

e2e-report-publish:
needs: [e2e-report]
if: ${{ always() && github.event.action == 'closed' && github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: html-report
path: html-report
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 569f3c4008862b4cc595f409db748f41
projectName: app-test
directory: html-report

0 comments on commit 09cb8b9

Please sign in to comment.