mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-09 05:57:26 +01:00
Code coverage pre-QA push.
This commit is contained in:
@@ -161,6 +161,7 @@ jobs:
|
||||
env:
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: 0
|
||||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||
COVERAGE: "true"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -219,6 +220,13 @@ jobs:
|
||||
name: blob-report-${{ matrix.shardIndex }}
|
||||
path: blob-report
|
||||
retention-days: 1
|
||||
- name: Upload coverage data
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-data-${{ matrix.shardIndex }}
|
||||
path: .nyc_output
|
||||
retention-days: 1
|
||||
|
||||
merge-playwright-reports:
|
||||
name: "Merge Playwright Reports"
|
||||
@@ -251,3 +259,39 @@ jobs:
|
||||
name: html-report--attempt-${{ github.run_attempt }}
|
||||
path: playwright-report
|
||||
retention-days: 14
|
||||
|
||||
merge-coverage:
|
||||
name: "Merge Code Coverage"
|
||||
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 coverage data from all shards
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: all-coverage
|
||||
pattern: coverage-data-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Merge coverage data
|
||||
run: |
|
||||
mkdir -p .nyc_output
|
||||
cp all-coverage/*.json .nyc_output/ 2>/dev/null || true
|
||||
npx nyc merge .nyc_output .nyc_output/merged-coverage.json
|
||||
|
||||
- name: Generate coverage report
|
||||
run: npx nyc report --temp-dir .nyc_output --report-dir coverage-e2e --reporter text --reporter text-summary --reporter lcov --reporter html
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-report--attempt-${{ github.run_attempt }}
|
||||
path: coverage-e2e
|
||||
retention-days: 14
|
||||
|
||||
Reference in New Issue
Block a user