Skip to content

Merge pull request #127 from r-hyperspec/improve-vignettes #300

Merge pull request #127 from r-hyperspec/improve-vignettes

Merge pull request #127 from r-hyperspec/improve-vignettes #300

# READ-ONLY FILE
#
# Original file resides in r-hyperspec/pkg-skelton.
# DO NOT EDIT in any other repo as these changes will be overwritten.
# Edit at r-hyperspec/pkg-skelton, then push there and
# this file will be deployed to the other repos.
#
on:
push:
branches:
- release
- main
- master
- develop
# - auto-update
- auto-update-test
pull_request:
branches:
- release
- main
- master
- develop
name: Test coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: "https://r-hyperspec.github.io/pkg-repo/"
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::devtools, any::roxygen2
needs: coverage
- name: "Install roxygen2==7.2.3"
run: |
remotes::install_version("roxygen2", "7.2.3")
shell: Rscript {0}
- name: Roxygenize
shell: Rscript {0}
run: |
# Vignettes are not needed for coverage tests
roclets <- roxygen2::load_options()$roclets
roclets <- roclets[!roclets %in% "vignette"]
devtools::document(roclets = roclets)
- name: Test coverage
shell: Rscript {0}
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
- name: Show testthat output
shell: bash
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package