Skip to content

Commit 4110484

Browse files
committed
Create subfolders for the coverage reports to avoid overwriting them
1 parent f98114c commit 4110484

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: codecov/codecov-action@v5
4949
with:
5050
token: ${{ secrets.CODECOV_TOKEN }}
51-
files: ./coverage/lcov.info
51+
files: ./coverage/e2e/lcov.info
5252
flags: e2e
5353
slug: WordPress/secure-custom-fields
5454
name: e2e-coverage

.github/workflows/phpunit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ jobs:
4040
composer install --no-progress --prefer-dist --no-interaction
4141
4242
- name: Run PHPUnit with coverage
43-
run: vendor/bin/phpunit --coverage-clover=coverage.xml
43+
run: mkdir -p coverage/phpunit && vendor/bin/phpunit --coverage-clover=coverage/phpunit/coverage.xml
4444

4545
- name: Upload coverage to Codecov
4646
uses: codecov/codecov-action@v5
4747
with:
4848
token: ${{ secrets.CODECOV_TOKEN }}
4949
slug: WordPress/secure-custom-fields
50-
files: ./coverage.xml
50+
files: ./coverage/phpunit/coverage.xml
5151
flags: phpunit
5252
name: phpunit-php-${{ matrix.php }}

.nycrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tempDir": ".nyc_output",
3-
"reportDir": "./coverage",
3+
"reportDir": "./coverage/e2e",
44
"reporter": [ "html", "lcov", "text" ],
55
"include": [ "assets/src/**/*.js", "assets/src/**/*.jsx" ],
66
"exclude": [

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ module.exports = {
1515
'!**/node_modules/**',
1616
'!**/vendor/**',
1717
],
18+
coverageDirectory: 'coverage/unit',
19+
coverageReporters: [ 'lcov', 'text', 'html' ],
1820
transformIgnorePatterns: [ 'node_modules/(?!(react-jsx-parser)/)' ],
1921
};

0 commit comments

Comments
 (0)