Changeset 57570 for trunk/.github/workflows/test-coverage.yml
- Timestamp:
- 02/08/2024 07:30:26 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/.github/workflows/test-coverage.yml (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/test-coverage.yml
r57566 r57570 58 58 # - Upload the multisite code coverage report to Codecov.io. 59 59 test-coverage-report: 60 name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report 60 name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report (${{ matrix.format }}) 61 61 runs-on: ubuntu-latest 62 62 permissions: … … 68 68 matrix: 69 69 multisite: [ false, true ] 70 format: [ clover, html ] 70 71 71 72 steps: … … 145 146 - name: Run tests as a single site 146 147 if: ${{ ! matrix.multisite }} 147 run: npm run test:php -- --verbose -c phpunit.xml.dist --coverage- clover wp-code-coverage-single-clover-${{ github.sha }}.xml148 run: npm run test:php -- --verbose -c phpunit.xml.dist --coverage-${{ 'html' == matrix.format && 'html' || 'clover' }} wp-code-coverage-single-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }} 148 149 149 150 - name: Ensure version-controlled files are not modified during the tests … … 155 156 with: 156 157 token: ${{ secrets.CODECOV_TOKEN }} 157 file: wp-code-coverage-single- clover-${{ github.sha }}.xml158 file: wp-code-coverage-single-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }} 158 159 flags: single,php 159 160 fail_ci_if_error: true 160 161 162 - name: Upload single site HTML report as artifact 163 if: ${{ ! matrix.multisite && matrix.format == 'html' }} 164 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 165 with: 166 name: wp-code-coverage-single-${{ github.sha }} 167 path: wp-code-coverage-single-${{ github.sha }} 168 overwrite: true 169 161 170 - name: Run tests as a multisite install 162 171 if: ${{ matrix.multisite }} 163 run: npm run test:php -- --verbose -c tests/phpunit/multisite.xml --coverage- clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml172 run: npm run test:php -- --verbose -c tests/phpunit/multisite.xml --coverage-${{ 'html' == matrix.format && 'html' || 'clover' }} wp-code-coverage-multisite-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }} 164 173 165 174 - name: Ensure version-controlled files are not modified during the tests … … 171 180 with: 172 181 token: ${{ secrets.CODECOV_TOKEN }} 173 file: wp-code-coverage-multisite- clover-${{ github.sha }}.xml182 file: wp-code-coverage-multisite-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }} 174 183 flags: multisite,php 175 184 fail_ci_if_error: true 185 186 - name: Upload multisite HTML report as artifact 187 if: ${{ matrix.multisite && matrix.format == 'html' }} 188 uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 189 with: 190 name: wp-code-coverage-multisite-${{ github.sha }} 191 path: wp-code-coverage-multisite-${{ github.sha }} 192 overwrite: true 176 193 177 194 slack-notifications:
Note: See TracChangeset
for help on using the changeset viewer.