2024-04-26 23:25:07 +08:00
|
|
|
# Triggers after the playwright tests have finished,
|
|
|
|
# taking the artifact and uploading it to Netlify for easier viewing
|
|
|
|
name: Upload End to End Test report to Netlify
|
|
|
|
on:
|
|
|
|
workflow_run:
|
|
|
|
workflows: ["End to End Tests"]
|
|
|
|
types:
|
|
|
|
- completed
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
|
|
|
|
cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
report:
|
2024-05-14 22:55:12 +08:00
|
|
|
if: github.event.workflow_run.conclusion != 'cancelled'
|
2024-04-26 23:25:07 +08:00
|
|
|
name: Report results
|
2024-11-13 19:13:02 +08:00
|
|
|
runs-on: ubuntu-24.04
|
2024-04-26 23:25:07 +08:00
|
|
|
environment: Netlify
|
|
|
|
permissions:
|
|
|
|
statuses: write
|
|
|
|
deployments: write
|
|
|
|
steps:
|
2024-06-03 18:03:26 +08:00
|
|
|
- name: Download HTML report
|
2024-04-26 23:25:07 +08:00
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
|
|
|
run-id: ${{ github.event.workflow_run.id }}
|
2024-06-03 18:03:26 +08:00
|
|
|
name: html-report
|
2024-04-26 23:25:07 +08:00
|
|
|
path: playwright-report
|
|
|
|
|
|
|
|
- name: 📤 Deploy to Netlify
|
|
|
|
uses: matrix-org/netlify-pr-preview@v3
|
|
|
|
with:
|
|
|
|
path: playwright-report
|
|
|
|
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
|
|
|
|
branch: ${{ github.event.workflow_run.head_branch }}
|
|
|
|
revision: ${{ github.event.workflow_run.head_sha }}
|
|
|
|
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
2024-10-16 18:24:37 +08:00
|
|
|
site_id: ${{ vars.NETLIFY_SITE_ID }}
|
2024-04-26 23:25:07 +08:00
|
|
|
desc: Playwright Report
|
|
|
|
deployment_env: EndToEndTests
|
|
|
|
prefix: "e2e-"
|