-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4a2dd9
commit 916ef4e
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ name: Validations CI | |
on: | ||
pull_request: | ||
branches: [ develop ] | ||
push: | ||
branches: [ feature_codecov ] | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -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: | | ||
|
@@ -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 | ||
|
@@ -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 }} |