-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from ewanwm/feature_codecov
Code coverage checks
- Loading branch information
Showing
4 changed files
with
30 additions
and
3 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 |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
run: cmake -DTEST_COVERAGE=ON -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
# Build your program with the given configuration | ||
|
@@ -50,3 +50,14 @@ jobs: | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest -C ${{env.BUILD_TYPE}} | ||
|
||
- name: Generate Coverage Report | ||
working-directory: ${{github.workspace}}/build | ||
run: gcovr --json -o nuTens_coverage.json -r .. -f "../nuTens/*" | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
verbose: true | ||
files: nuTens_coverage.json | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
attrs==23.2.0 | ||
filelock==3.15.4 | ||
gcovr==7.2 | ||
jinja2==3.1.4 | ||
jsonschema-specifications==2023.12.1 | ||
MarkupSafe==2.1.3 | ||
|
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