-
Notifications
You must be signed in to change notification settings - Fork 14
68 lines (56 loc) · 2.11 KB
/
R-CMD-check.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: R-CMD-check
on:
pull_request:
branches: [ master ]
jobs:
R-CMD-check:
name: ${{ matrix.config.r-version }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
config:
- {os: ubuntu-20.04, r-version: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r-version: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up R ${{ matrix.config.r-version }}
uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r-version }}
- name: Install remotes
run: >
Rscript
-e "if (system.file(package = 'remotes') == '') install.packages('remotes')"
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
shell: Rscript {0}
- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash