Skip to content

Commit

Permalink
Merge pull request #1051 from jennydaman/istanbul
Browse files Browse the repository at this point in the history
Improve coverage accuracy by replacing v8 coverage with Istanbul
  • Loading branch information
PintoGideon committed Feb 7, 2024
2 parents 5cbd304 + 67605c2 commit 94ba0d2
Show file tree
Hide file tree
Showing 10 changed files with 872 additions and 141 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ yarn-debug.log*
yarn-error.log*
test-results
playwright-report
.nyc_output
coverage
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ jobs:
env:
TEST_SAFARI: yes
run: npm run test:e2e
- name: Upload E2E test coverage
- name: Report coverage
id: report
if: ${{ always() }}
run: npm run test:lcov
- name: Upload E2E test coverage
if: steps.report.outcome == 'success'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/clover.xml
files: coverage/lcov.info
flags: e2etests
fail_ci_if_error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/coverage
/test-results
/playwright-report
/.nyc_output

# production
/build
Expand Down
10 changes: 10 additions & 0 deletions deleteCoverageData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { FullConfig } from "playwright/test";
import path from "path";
import * as fsPromises from "node:fs/promises";

async function globalSetup(_config: FullConfig) {
const nycOutput = path.join(process.cwd(), ".nyc_output");
await fsPromises.rm(nycOutput, { recursive: true, force: true });
}

export default globalSetup;
Loading

0 comments on commit 94ba0d2

Please sign in to comment.