Skip to content

Update README for codecov badge #19

Update README for codecov badge

Update README for codecov badge #19

# CI GitHub Action ... adapted from usethis::use_github_actions()
on:
push:
branches:
- master
- dev_*
pull_request:
branches:
- master
- dev_*
name: GitHub Actions CI
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release', not_cran: 'true'}
- {os: macos-13, r: 'release'}
- {os: macos-12, r: 'oldrel'}
- {os: ubuntu-22.04, r: 'devel', not_cran: 'true'}
- {os: ubuntu-22.04, r: 'release', not_cran: 'true'}
- {os: ubuntu-22.04, r: 'oldrel', not_cran: 'true'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage
- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = TRUE,
token = "${{ secrets.CODECOV_TOKEN }}",
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}
- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package