nmfs-fish-tools / ghactions4r

Reusable github actions workflows for R packages
https://nmfs-fish-tools.github.io/ghactions4r/
12 stars 1 forks source link

Add use-public-rspm = FALSE option to calc coverage. #113

Closed k-doering-NOAA closed 9 months ago

k-doering-NOAA commented 10 months ago

Addresses #110. The purpose is to allow users to specify use-public-rspm = FALSE in a workflow. This means that cran (not compiled for linux) packages will be used instead of posit package manager (compiled for linux). This is unlikely to be used, as the runs will be slower; however, there is a matrix bug that affects TMB dependencies that can be fixed by downloading from source instead of compiled packages.

The workflow would look like this:

# call a workflow that runs covr::codecov() to calculate code coverage
name: call-calc_coverage
# on specifies the build triggers. See more info at https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
# The default is to run the workflow on every push or pull request to every branch.
on: [push, pull_request]
jobs:
  call-workflow:
    uses: nmfs-fish-tools/ghactions4r/.github/workflows/calc-coverage.yml@main
    with:
      use-public-rspm: false

For testing purposes before this PR is merged in, use the branch fix-calc-cov instead of main.

@Andrea-Havron-NOAA, when you are back, could you test and see if this solves the failing clustTMB calc coverage workflow?

codecov-commenter commented 10 months ago

Welcome to Codecov :tada:

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered :open_umbrella:

k-doering-NOAA commented 9 months ago

@Andrea-Havron-NOAA just a reminder about this!

Andrea-Havron-NOAA commented 9 months ago

Thanks for the reminder @k-doering-NOAA. I tested this on my clustTMB package and the calc-coverage workflow is passing again. Thanks for this fix!

k-doering-NOAA commented 9 months ago

Thanks @Andrea-Havron-NOAA ! Merging into main.