Skip to content

Commit

Permalink
Update codecov.yaml with github path for report
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-messier authored Sep 26, 2023
1 parent bca856f commit c28cb04
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,25 @@ jobs:
- name: Install dependencies for covr and testthat
run: R -e 'install.packages(c("covr", "testthat"), dependencies = TRUE)'


- name: Run tests and calculate coverage
run: |
echo "Current working directory: $(pwd)"
R -e 'library(covr); covr::package_coverage()'
- name: Check if coverage report exists
run: |
if [ -f "${{ github.workspace }}/coverage.xml" ]; then
echo "Coverage report found."
else
echo "Coverage report not found."
exit 1 # Exit with an error if the report is missing
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
coverage_reports: "/home/runner/work/NRTAPmodel/NRTAPmodel/coverage.xml"
coverage_reports: ${{ github.workspace }}/coverage.xml

- name: Cleanup
run: |
Expand Down

0 comments on commit c28cb04

Please sign in to comment.