Skip to content

Commit

Permalink
let's try codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
KSkwarczynski committed Dec 1, 2024
1 parent f4a2dd9 commit 916ef4e
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/CIValidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: Validations CI
on:
pull_request:
branches: [ develop ]
push:
branches: [ feature_codecov ]

permissions:
contents: read
Expand Down Expand Up @@ -77,9 +79,10 @@ jobs:
cd /opt/
git clone https://github.com/mach3-software/MaCh3Tutorial.git MaCh3Validations
cd MaCh3Validations
git checkout feature_codecov # delete!!!!!!
mkdir build
cd build
cmake ../ -DMaCh3_Branch=${{ github.head_ref }} -DMaCh3Tutorial_UNITTESTS_ENABLED=TRUE
cmake ../ -DMaCh3_Branch=${{ github.head_ref }} -DMaCh3Tutorial_UNITTESTS_ENABLED=TRUE -DMaCh3Tutorial_Coverage_ENABLED=TRUE
- name: Build MaCh3 Validations
run: |
Expand All @@ -93,7 +96,7 @@ jobs:
cd /opt/MaCh3Validations/build
${{ matrix.test_1 }}
#KS: GHA is stupi when it comes to arrays. I tried something fancy but it was crashing terribly
#KS: GHA is stupid when it comes to arrays. I tried something fancy but it was crashing terribly
#If you know how to write this better please let me know
# Run the second test if it is defined
Expand Down Expand Up @@ -145,3 +148,20 @@ jobs:
${{ matrix.test_9 }}
fi
- name: Install gcovr
run: |
apt-get update
apt-get install -y gcovr
- name: Generate Coverage Report
# only need to do this for one combination of OS and compiler
working-directory: /opt/MaCh3Validations/build
run: gcovr --json -o MaCh3_coverage.json -r .. -f "../MaCh3/*"

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
verbose: true
files: MaCh3_coverage.json
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 916ef4e

Please sign in to comment.