Skip to content

Commit

Permalink
ci: upload coverage in separate job matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed May 9, 2024
1 parent 8c69e42 commit 3fd0495
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,50 @@ jobs:
--xml-pretty \
-o coverage.xml
- name: Upload coverage
# any except canceled or skipped
- name: Upload coverage artifact
if: >-
always() &&
(steps.test_report.outcome == 'success') &&
startsWith(github.repository, 'LizardByte/')
(steps.test_report.outcome == 'success')
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}
path: build/coverage.xml

coverage:
if: >-
always() &&
(needs.build.result == 'success' || needs.build.result == 'failure') &&
startsWith(github.repository, 'LizardByte/')
name: Coverage
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- build_os: ubuntu-latest
flag: Linux
os: linux
- build_os: macos-latest
flag: macOS
os: macos
- build_os: windows-latest
flag: Windows
os: windows
steps:
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage-${{ matrix.build_os }}
path: build

- name: Upload coverage
uses: codecov/codecov-action@v4
with:
disable_search: true
fail_ci_if_error: true
files: ./build/coverage.xml
flags: ${{ runner.os }}
flags: ${{ matrix.flag }}
os: ${{ matrix.os }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

0 comments on commit 3fd0495

Please sign in to comment.