Skip to content

CI

CI #231

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
# Trigger the workflow...
on:
# ...on push or pull request
push:
pull_request:
# ...on a weekly basis at 00:00 UTC on Saturday
schedule:
- cron: '0 0 * * 6'
name: CI
jobs:
CI:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'oldrel-1'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'devel'}
- {os: macOS-latest, r: 'oldrel-1'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
# this gets often stuck (esp. on macOS) for the default 6h timeout
timeout-minutes: 5
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::rcmdcheck
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
- name: Test coverage
if: success() && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
pak::pkg_install("covr")
covr::codecov()
shell: Rscript {0}
- name: Build and deploy pkgdown website
if: success() && github.ref == 'refs/heads/main' && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
R CMD INSTALL .
Rscript -e 'pak::pkg_install("pkgdown")'
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'