-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (39 loc) · 1.27 KB
/
e2e-merge-reports.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Merge e2e test reports
on:
workflow_call:
inputs:
project:
required: true
type: string
jobs:
merge-reports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: ${{ inputs.project }}-blob-reports
pattern: ${{ inputs.project }}-blob-report-*
merge-multiple: true
- name: Merge into HTML Report
id: merge
run: |
if [ -d "./${{ inputs.project }}-blob-reports" ]; then
echo "Merging reports..."
npx playwright merge-reports --reporter html ./${{ inputs.project }}-blob-reports
echo "continue=true" >> $GITHUB_OUTPUT
else
echo "No reports found. Skipping merge."
echo "continue=false" >> $GITHUB_OUTPUT
fi
- name: Upload HTML report
if: ${{ steps.merge.outputs.continue == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.project }}-html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 2