mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Build/Test: Send Code Coverage reports to Codecov.
Help visualize and explore code coverage reports to avoid blunders. Props desrosj, swissspidy. Fixes #52141. git-svn-id: https://develop.svn.wordpress.org/trunk@49903 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
16
.github/workflows/test-coverage.yml
vendored
16
.github/workflows/test-coverage.yml
vendored
@@ -124,7 +124,7 @@ jobs:
|
||||
run: npm run env:install
|
||||
|
||||
- name: Run tests as a single site
|
||||
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-html wp-code-coverage-single-${{ github.sha }}
|
||||
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-html wp-code-coverage-single-${{ github.sha }} --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml
|
||||
|
||||
- name: Create ZIP artifact of single site results
|
||||
uses: thedoctor0/zip-release@0.4.1
|
||||
@@ -139,8 +139,14 @@ jobs:
|
||||
path: wp-code-coverage-single-${{ github.sha }}.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload single site report to codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
file: wp-code-coverage-single-clover-${{ github.sha }}.xml
|
||||
flags: single,php
|
||||
|
||||
- name: Run tests as a multisite install
|
||||
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-html wp-code-coverage-multisite-${{ github.sha }}
|
||||
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-html wp-code-coverage-multisite-${{ github.sha }} --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml
|
||||
|
||||
- name: Create ZIP artifact of multisite results
|
||||
uses: thedoctor0/zip-release@0.4.1
|
||||
@@ -154,3 +160,9 @@ jobs:
|
||||
name: wp-code-coverage-multisite-${{ github.sha }}
|
||||
path: wp-code-coverage-multisite-${{ github.sha }}.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload multisite report to codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
file: wp-code-coverage-multisite-clover-${{ github.sha }}.xml
|
||||
flags: multisite,php
|
||||
|
||||
Reference in New Issue
Block a user