Skip to content

Commit

Permalink
move flaky tests action to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
szczecha committed Jan 17, 2025
1 parent 86e5475 commit b7d5d32
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 26 deletions.
38 changes: 38 additions & 0 deletions .github/actions/flaky-tests-report/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Flaky test report
description: Extract flaky tests from PW test reports
runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
with:
node-version: 20

- name: Install CTRF package globally
run: npm install -g ctrf

- name: Download ctrf reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: ctrf
pattern: ctrf-report-*
merge-multiple: true

- name: Merge CTRF reports
run: ctrf merge ./ctrf --output ./ctrf/merged-report.json

- name: Upload CTRF report
uses: actions/upload-artifact@v4
with:
name: merged-report.json
path: ctrf
retention-days: 14

- name: Publish Test Report
uses: ctrf-io/github-test-reporter@v1
with:
report-path: ctrf/merged-report.json
summary-report: true
previous-results-report: true
failed-report: true
flaky-report: true
if: always()
26 changes: 0 additions & 26 deletions .github/actions/merge-pw-reports/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,3 @@ runs:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14

- name: Merge ctrf reports
shell: bash
run: npx ctrf merge ./ctrf --output merged-ctrf-report.json

- name: Publish Test Report
uses: ctrf-io/github-test-reporter@v1
with:
report-path: './ctrf/*.json'
summary-report: true
previous-results-report: true
failed-report: true
flaky-report: true
if: always()

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: ctrf-report
path: ctrf-reports/merged-ctrf-report.json

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: custom-artifact-name
path: ctrf-reports/ctrf-report-no-fails.json

0 comments on commit b7d5d32

Please sign in to comment.