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
40 changes: 39 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ jobs:
env:
NODE_TLS_REJECT_UNAUTHORIZED: 0
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
COVERAGE: 1
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -217,13 +218,50 @@ jobs:
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --list
- name: Run test shard ${{ matrix['shardIndex'] }} of ${{ matrix['shardTotal']}}
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers=3
- name: "Generate code coverage report for shard ${{ matrix['shardIndex'] }}"
if: ${{ !cancelled() }}
run: npx nyc report --reporter=html --reporter=text --reporter=lcov --report-dir=coverage/shard-${{ matrix.shardIndex }}
- name: Upload blob report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ matrix.shardIndex }}
path: blob-report
retention-days: 1
- name: Upload coverage report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ matrix.shardIndex }}
path: coverage/shard-${{ matrix.shardIndex }}
retention-days: 1

merge-coverage-reports:
name: "Merge Coverage Reports"
if: ${{ !cancelled() }}
needs: [playwright-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Download all raw coverage data
uses: actions/download-artifact@v4
with:
path: all-coverage
pattern: coverage-report-*
merge-multiple: true
- name: Generate merged coverage report
run: npx nyc merge all-coverage coverage.json
- name: Upload merged coverage report
uses: actions/upload-artifact@v4
with:
name: merged-coverage-report--attempt-${{ github.run_attempt }}
path: all-coverage
retention-days: 14

merge-playwright-reports:
name: "Merge Playwright Reports"
Expand Down Expand Up @@ -255,4 +293,4 @@ jobs:
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14
retention-days: 14
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ src/Localization/Keys.generated.ts
/playwright-report/
/blob-report/
/playwright/.cache/
.nyc_output/
coverage-e2e/
Loading
Loading