Skip to content

Update workflow and formatting #571

Update workflow and formatting

Update workflow and formatting #571

Workflow file for this run

name: R
on:
pull_request:
branches:
- "*"
push:
branches:
- "master"
jobs:
build:
strategy:
max-parallel: 5
matrix:
config:
- { os: ubuntu-latest }
- { os: windows-latest }
- { os: macos-latest }
runs-on: ${{ matrix.config.os }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
id: install-r
with:
use-public-rspm: true
- uses: r-lib/actions/setup-pandoc@v2
- name: Cache R packages
uses: actions/cache@v4
with:
path: /home/runner/work/_temp/Library
key: ${{ runner.OS }}-R-${{ steps.install-r.outputs.installed-r-version }}-cache-${{ hashFiles('.github/depends.Rds') }}
restore-keys: |
${{ runner.OS }}-R-${{ steps.install-r.outputs.installed-r-version }}-cache-
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- name: Test coverage
if: github.actor == 'zktuong'
run: |
Rscript -e 'covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")'
shell: bash -l {0}