Skip to content

Commit

Permalink
shard number in file name
Browse files Browse the repository at this point in the history
  • Loading branch information
szczecha committed Jan 24, 2025
1 parent 0db8a65 commit 1646ac0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
11 changes: 7 additions & 4 deletions .github/actions/flaky-tests-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ runs:
pattern: ctrf-report-*
path: ctrf-reports

- name: Move and Rename Files
- name: List CTRF reports
shell: bash
run: |
mv ctrf-reports/ctrf-report-1/ctrf-report.json ctrf-reports/ctrf-report-1.json
mv ctrf-reports/ctrf-report-2/ctrf-report.json ctrf-reports/ctrf-report-2.json
run: ls ctrf-reports
# - name: Move and Rename Files
# shell: bash
# run: |
# mv ctrf-reports/ctrf-report-1/ctrf-report.json ctrf-reports/ctrf-report-1.json
# mv ctrf-reports/ctrf-report-2/ctrf-report.json ctrf-reports/ctrf-report-2.json

- name: Merge CTRF reports
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/run-pw-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ runs:
PROJECT_PARAMS+="--project=${PROJECT} "
done
echo "reportName=all-blob-reports-${SHARD_NUMBER%%/*}" >> $GITHUB_ENV
echo "ctrfReport=ctrf-report-${SHARD_NUMBER%%/*}" >> $GITHUB_ENV
npx playwright test --grep @e2e $PROJECT_PARAMS --shard "$SHARD_NUMBER"
- name: Upload blob report to GitHub Actions Artifacts
Expand All @@ -104,6 +103,7 @@ runs:
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ env.ctrfReport }}
path: ctrf
retention-days: 1
path: ctrf/ctrf-report-*.json
retention-days: 1
compression-level: 0
name: ctrf
11 changes: 9 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@ export default defineConfig({
process.env.URL_TO_RUN ? process.env.URL_TO_RUN : "",
},
],
["playwright-ctrf-json-reporter", {}]
]
['playwright-ctrf-json-reporter', {
outputFile: `ctrf-report-${process.env.SHARD_NUMBER.match(/^\d*/)[0]}.json`, // Optional: Output file name. Defaults to 'ctrf-report.json'.
minimal: true, // Optional: Generate a minimal report. Defaults to 'false'. Overrides screenshot and testType when set to true
annotations: false, // Optional: Include annotations in the report. Defaults to 'false'.
appName: 'Saleor Dashboard', // Optional: Specify the name of the application under test.
appVersion: 'main', // Optional: Specify the version of the application under test.
branchName: "main", // Optional: Specify the branch name.
testEnvironment: "staging" // Optional: Specify the test environment (e.g. staging, production).
}]]
: [["html"], ["list"]],
expect: { timeout: 10 * 1000 },
maxFailures: 10,
Expand Down

0 comments on commit 1646ac0

Please sign in to comment.