1
- on : [push, pull_request]
1
+ on :
2
+ push :
3
+ branches :
4
+ - master
5
+ pull_request :
6
+ branches :
7
+ - master
2
8
3
9
name : R-CMD-check
4
10
@@ -12,18 +18,19 @@ jobs:
12
18
fail-fast : false
13
19
matrix :
14
20
config :
15
- - {os: windows -latest, r: '3.6 '}
16
- - {os: windows -latest, r: 'devel '}
17
- - {os: macOS -latest, r: '3.6 '}
18
- # - {os: ubuntu-16.04, r: '3.2 ', rspm: "https://demo.rstudiopm .com/all /__linux__/xenial/latest"}
19
- # - {os: ubuntu-16.04, r: '3.3 ', rspm: "https://demo.rstudiopm .com/all /__linux__/xenial/latest"}
20
- - {os: ubuntu-16.04, r: '3.4 ', rspm: "https://demo.rstudiopm .com/all /__linux__/xenial/latest"}
21
- - {os: ubuntu-16.04, r: '3.5 ', rspm: "https://demo.rstudiopm .com/all /__linux__/xenial/latest"}
22
- - {os: ubuntu-16.04, r: '3.6 ', rspm: "https://demo.rstudiopm .com/all /__linux__/xenial/latest"}
21
+ - {os: macOS -latest, r: 'devel '}
22
+ - {os: macOS -latest, r: 'release '}
23
+ - {os: windows -latest, r: 'release '}
24
+ - {os: ubuntu-16.04, r: 'release ', rspm: "https://packagemanager.rstudio .com/cran /__linux__/xenial/latest"}
25
+ - {os: ubuntu-16.04, r: 'oldrel ', rspm: "https://packagemanager.rstudio .com/cran /__linux__/xenial/latest"}
26
+ - {os: ubuntu-16.04, r: '3.5 ', rspm: "https://packagemanager.rstudio .com/cran /__linux__/xenial/latest"}
27
+ - {os: ubuntu-16.04, r: '3.4 ', rspm: "https://packagemanager.rstudio .com/cran /__linux__/xenial/latest"}
28
+ - {os: ubuntu-16.04, r: '3.3 ', rspm: "https://packagemanager.rstudio .com/cran /__linux__/xenial/latest"}
23
29
24
30
env :
25
31
R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
26
32
RSPM : ${{ matrix.config.rspm }}
33
+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
27
34
28
35
steps :
29
36
- uses : actions/checkout@v2
@@ -37,16 +44,17 @@ jobs:
37
44
- name : Query dependencies
38
45
run : |
39
46
install.packages('remotes')
40
- saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
47
+ saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48
+ writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
41
49
shell : Rscript {0}
42
50
43
51
- name : Cache R packages
44
52
if : runner.os != 'Windows'
45
53
uses : actions/cache@v1
46
54
with :
47
55
path : ${{ env.R_LIBS_USER }}
48
- key : ${{ runner.os }}-r- ${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
49
- restore-keys : ${{ runner.os }}-r- ${{ matrix.config.r }}-
56
+ key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- ${{ hashFiles('.github/ depends.Rds') }}
57
+ restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1 -
50
58
51
59
- name : Install system dependencies
52
60
if : runner.os == 'Linux'
@@ -63,10 +71,24 @@ jobs:
63
71
remotes::install_cran("rcmdcheck")
64
72
shell : Rscript {0}
65
73
74
+ - name : Session info
75
+ run : |
76
+ options(width = 100)
77
+ pkgs <- installed.packages()[, "Package"]
78
+ sessioninfo::session_info(pkgs, include_base = TRUE)
79
+ shell : Rscript {0}
80
+
66
81
- name : Check
67
- run : rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
82
+ env :
83
+ _R_CHECK_CRAN_INCOMING_ : false
84
+ run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
68
85
shell : Rscript {0}
69
86
87
+ - name : Show testthat output
88
+ if : always()
89
+ run : find check -name 'testthat.Rout*' -exec cat '{}' \; || true
90
+ shell : bash
91
+
70
92
- name : Upload check results
71
93
if : failure()
72
94
uses : actions/upload-artifact@master
0 commit comments