Skip to content

Commit

Permalink
fix call-calc-coverage workflow
Browse files Browse the repository at this point in the history
* update the DESCRIPTION file and set Config/testthat/parallel to false.
  This addresses the GHA run-time issue.
* skip parallel tests when running covr::package_coverage(), as these tests
  don't contribute to increasing code coverage and are redundant due to
  the reuse of wrapper functions. Integration tests are sufficient for
  coverage calculation.
* update GHA build triggers and remove the paths-ignore section. In the
  future, if workflow run times become too long, consider setting up a
  paths filter. This would limit the workflow to run only when changes
  are made to specific folders, such as inst/include, src, or R, rather
  than listing all non-code files.

Co-authored-by: Kathryn Doering <[email protected]>
  • Loading branch information
Bai-Li-NOAA and k-doering-NOAA committed Jan 8, 2025
1 parent cb222ec commit a6eb09a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/call-calc-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ name: call-calc_coverage
# The default is to run the workflow on every push or pull request to every branch.
on:
workflow_dispatch:
paths-ignore:
- .devcontainer
- .github
- 'LICENSE'
- 'README.md'
- 'CONTRIBUTING.md'
- 'Rbuildignore'
- '.gitignore'
- 'man'
push:
branches:
- dev
pull_request:
branches:
- main
- dev
jobs:
call-workflow:
uses: nmfs-fish-tools/ghactions4r/.github/workflows/calc-coverage.yml@main
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ LinkingTo:
VignetteBuilder:
knitr
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/testthat/parallel: false
Encoding: UTF-8
LazyData: true
NeedsCompilation: yes
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-parallel-with-snowfall-with-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# modes. The parallel execution uses {snowfall} to parallelize the tasks across
# multiple CPU cores.

testthat::skip_on_covr()
# Load the model comparison operating model data from the fixtures folder
load(test_path("fixtures", "integration_test_data.RData"))

Expand Down

0 comments on commit a6eb09a

Please sign in to comment.