-
Notifications
You must be signed in to change notification settings - Fork 6
88 lines (71 loc) · 2.39 KB
/
check.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# Name of the workflow
name: Check
# When to run
on:
push:
branches-ignore:
- gh-pages
pull_request:
branches-ignore:
- gh-pages
# Run R-CMD-check in multiple platforms
jobs:
Check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.r }})
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-16.04]
r: ['oldrel', 'release']
include:
- os: ubuntu-16.04
r: 'devel'
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_CRAN_INCOMING_REMOTE_: false
CHESS_TEST: 1
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.r }}
- uses: r-lib/actions/setup-pandoc@v1
- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.r }}-lib-${{ github.sha }}
restore-keys: ${{ runner.os }}-r-${{ matrix.r }}-lib-
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get install librsvg2-dev libcurl4-openssl-dev libssl-dev libicu-dev
- name: Install R dependencies
run: |
install.packages(c('remotes', 'rcmdcheck'))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Install Miniconda
run: |
install.packages('reticulate')
reticulate::install_miniconda()
shell: Rscript {0}
- name: Configure Miniconda on MacOS
if: runner.os == 'macOS'
run: echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile
- name: Install python-chess
run: |
remotes::install_local()
chess::install_chess()
shell: Rscript {0}
- name: Check package
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.r }}-results
path: check