Skip to content

CI Tests

CI Tests #425

Workflow file for this run

name: CI Tests
on:
push:
pull_request:
schedule:
# Run every Monday at midnight
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
test:
name: ${{ matrix.os }} (R ${{ matrix.r-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
r-version: 'release'
- os: macos-latest
r-version: 'release'
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: If local, apt update
if: ${{ (env.ACT || false) && (matrix.os == 'ubuntu-latest')}}
run: sudo apt update
- name: Install Tidy Ubuntu
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y tidy
- name: set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::covr
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--as-cran")'
error-on: '"warning"'
check-dir: '"check"'
upload-results: '"true"'
upload-snapshots: '"true"'
- name: upload coverage
if: ${{ matrix.os == 'macos-latest' && matrix.r-version == 'release' }}
shell: Rscript {0}
run: covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
all-successful:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Note that all tests succeeded
run: echo "🎉"