Skip to content

Run Nightly Code Coverage #50

Run Nightly Code Coverage

Run Nightly Code Coverage #50

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
name: Run Nightly Code Coverage
# schedule from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
on:
schedule:
- cron: '0 0 * * *'
jobs:
test-coverage:
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Setup Pandoc for word conversion
uses: r-lib/actions/setup-pandoc@v2
- name: Install packages
run: |
Rscript .github/workflows/install_dependencies.R
Rscript -e "install.packages('covr', repos = 'http://cran.us.r-project.org', type='win.binary')"
- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}
continue-on-error: true
- name: Show testthat output
run: |
cat ${{ runner.temp }}/package/ospsuite.globalsensitivity/ospsuite.globalsensitivity-tests/testthat.Rout*
shell: cmd
- name: Upload test results in case of failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package