Skip to content

ci: modernise workflows #180

ci: modernise workflows

ci: modernise workflows #180

Workflow file for this run

name: R-CMD-check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
R-CMD-check:
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'devel'}
- {os: macOS-latest, r: 'oldrel'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-22.04, r: 'oldrel'}
- {os: ubuntu-22.04, r: 'release'}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
runs-on: ${{ matrix.config.os }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: true
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 }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::covr, any::xml2
needs: check, coverage
- name: Check
uses: r-lib/actions/check-r-package@v2
- name: Test coverage
id: covr
if: success() && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
cov <- covr::package_coverage(
type = "all",
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP")), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}
- uses: codecov/codecov-action@v4
if: steps.covr.outcome == 'success'
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}