-
Notifications
You must be signed in to change notification settings - Fork 20
55 lines (48 loc) · 1.49 KB
/
check-all-examples.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Make sure all examples run successfully, even the ones that are not supposed
# to be run or tested on CRAN machines by default.
#
# The examples that fail should use
# - `if (FALSE) { ... }` (if example is included only for illustrative purposes)
# - `try({ ... })` (if the intent is to show the error)
#
# This workflow helps find such failing examples that need to be modified.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
# * is a special character in YAML so you have to quote this string
# Trigger once a week at 00:00 on Sunday
- cron: "0 0 * * SUN"
name: check-all-examples
jobs:
check-all-examples:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: "devel"
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: "TRUE"
extra-packages: |
any::devtools
local::.
needs: check
- name: Run examples
run: |
options(
crayon.enabled = TRUE,
# warnPartialMatchArgs = TRUE,
# warnPartialMatchAttr = TRUE,
# warnPartialMatchDollar = TRUE,
warn = 2L
)
devtools::run_examples(run_dontrun = TRUE, run_donttest = TRUE, document = FALSE)
shell: Rscript {0}