Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/actions/merge-playwright-json-reports/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Merge Playwright Reports'
description: 'Merge Playwright reports from different browsers and shards'
inputs:
working-directory:
description: 'Package directory where Playwright was run (e.g., packages/atomic)'
required: true
artifact-pattern:
description: Glob-like pattern used to match the names of downloaded Playwright blob report artifacts (e.g., blob-report-shard-*)'
required: true
upload-artifact-name:
description: 'Name for the uploaded artifact'
required: true
output-folder:
description: 'Folder where final merged report will be generated'
required: false
default: ''

runs:
using: composite
steps:
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
path: ${{ inputs.working-directory }}/all-blob-reports
pattern: ${{ inputs.artifact-pattern }}
merge-multiple: true
- name: Merge into JSON Report
run: npx playwright merge-reports --reporter json ./all-blob-reports > merged-json-report.json
working-directory: ${{ inputs.working-directory }}
shell: bash

- name: Upload JSON report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ inputs.upload-artifact-name }}
path: ${{ inputs.working-directory }}/merged-json-report.json
retention-days: 5
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ jobs:
e2e-quantic:
name: "Run Quantic E2E tests"
needs: affected
if: contains(needs.affected.outputs.projects, '@coveo/quantic')
uses: ./.github/workflows/e2e-quantic.yml
secrets:
SFDX_AUTH_CLIENT_ID: ${{ secrets.SFDX_AUTH_CLIENT_ID }}
Expand Down
41 changes: 40 additions & 1 deletion .github/workflows/e2e-quantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,52 @@

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/setup
- name: Merge Playwright reports
- name: Merge Playwright HTML reports
uses: ./.github/actions/merge-playwright-reports
with:
working-directory: packages/quantic
artifact-pattern: quantic-blob-report-*
upload-artifact-name: quantic-playwright-report
- name: Merge Playwright JSON reports
uses: ./.github/actions/merge-playwright-json-reports
with:
working-directory: packages/quantic
artifact-pattern: quantic-blob-report-*
upload-artifact-name: quantic-playwright-report-json
Publish-Dashboard:
name: Create playwright-dashboard page
if: (success() || failure())
# if: (success() || failure()) && github.event_name == 'schedule' && github.ref == 'refs/heads/master'
needs: [merge-quantic-playwright-reports]
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- name: Download artifact
uses: actions/download-artifact@v4

- name: Publish google chart
uses: coveo-platform/actions/playwright-dashboard@playwright-dashboard-v1
with:
project_name: "quantic-regression"
artifact_name: quantic-playwright-report-json
json_report_name: merged-json-report.json
filter_report_by_branch: "SFINT-6399"
filter_report_by_event_type: "pull_request"
days_in_past: "30"

- name: Upload Playwright report and charts to S3
run: |
aws s3 cp $GITHUB_WORKSPACE/quantic-playwright-report \
s3://playwright-dashboard-bucket/quantic-regression/quantic-regression-reports/${{ github.run_id }}/ \
--recursive || true

aws s3 cp $GITHUB_WORKSPACE/quantic-regression_chart.html \
s3://playwright-dashboard-bucket/quantic-regression/quantic-regression_chart.html
e2e-quantic-cleanup:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
if: cancelled() || failure() || success()
needs:
- e2e-quantic-playwright-test
Expand Down
Loading