@@ -28,16 +28,17 @@ jobs:
28
28
config :
29
29
- {os: macOS-latest, r: 'release', visual_tests: true, node: "14.x", shinytest: true}
30
30
- {os: windows-latest, r: 'release'}
31
- # - {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
32
- - {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
31
+ - {os: windows-latest, r: '4.1'}
32
+ - {os: windows-latest, r: '3.6'}
33
+ - {os: ubuntu-18.04, r: 'devel'}
33
34
# vdiffr & shinytest only runs on linux r-release since the results aren't cross-platform
34
- - {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35
- - {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
36
- - {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
37
- - {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35
+ - {os: ubuntu-18.04, r: 'release'}
36
+ - {os: ubuntu-18.04, r: 'oldrel-1'}
37
+ - {os: ubuntu-18.04, r: 'oldrel-2'}
38
+ - {os: ubuntu-18.04, r: 'oldrel-3'}
39
+ - {os: ubuntu-18.04, r: 'oldrel-4'}
38
40
39
41
env :
40
- RSPM : ${{ matrix.config.rspm }}
41
42
VISUAL_TESTS : ${{ matrix.config.visual_tests }}
42
43
SHINYTEST : ${{ matrix.config.shinytest }}
43
44
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
@@ -48,43 +49,19 @@ jobs:
48
49
steps :
49
50
- uses : actions/checkout@v2
50
51
51
- - uses : r-lib/actions/setup-r@v1
52
+ - uses : r-lib/actions/setup-r@v2
52
53
id : install-r
53
54
with :
54
55
r-version : ${{ matrix.config.r }}
55
- http-user-agent : ${{ matrix.config.http-user-agent }}
56
+ use-public-rspm : true
56
57
57
- - uses : r-lib/actions/setup-pandoc@v1
58
+ - uses : r-lib/actions/setup-pandoc@v2
58
59
59
- - name : Install pak and query dependencies
60
- run : |
61
- install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
62
- saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
63
- shell : Rscript {0}
64
-
65
- - name : Restore R package cache
66
- uses : actions/cache@v2
60
+ - uses : r-lib/actions/setup-r-dependencies@v2
67
61
with :
68
- path : |
69
- ${{ env.R_LIBS_USER }}/*
70
- !${{ env.R_LIBS_USER }}/pak
71
- key : ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
72
- restore-keys : ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
62
+ cache-version : 3
63
+ needs : check
73
64
74
- - name : Install Linux sysdeps
75
- if : runner.os == 'Linux'
76
- run : |
77
- pak::local_system_requirements(execute = TRUE)
78
- pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
79
- shell : Rscript {0}
80
-
81
- - name : Install dependencies
82
- run : |
83
- if (Sys.info()[['sysname']] == 'Darwin') options(pkgType = 'mac.binary')
84
- pak::local_install_dev_deps(upgrade = FALSE)
85
- pak::pkg_install("rcmdcheck")
86
- shell : Rscript {0}
87
-
88
65
- name : Set up Python 3.8
89
66
uses : actions/setup-python@v2
90
67
with :
110
87
- name : Run Tests
111
88
run : |
112
89
options(crayon.enabled = TRUE, testthat.progress.max_fails=1000)
113
- if (!require(devtools)) pak::pak("devtools")
114
- if (!require(reshape2)) pak::pak("reshape2")
115
90
res <- devtools::test()
116
91
df <- as.data.frame(res)
117
92
if (sum(df$failed) > 0 || any(df$error)) stop("GHA CI tests failed")
@@ -125,19 +100,17 @@ jobs:
125
100
name : ${{ runner.os }}-r${{ matrix.config.r }}-results
126
101
path : ./
127
102
128
- # Run check with --no-tests since we ran them abve
129
- - name : Check
130
- run : |
131
- options(crayon.enabled = TRUE)
132
- rcmdcheck::rcmdcheck(args = c("--no-tests", "--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
133
- shell : Rscript {0}
134
-
103
+ - name : Check package
104
+ uses : r-lib/actions/check-r-package@v2
105
+ with :
106
+ check-dir : ' "check"'
107
+ # Run check with --no-tests since we ran them abve
108
+ # 2023-01-03: `{purrr}` v1.0.0 had trouble on Windows without the `--no-multiarch`
109
+ # https://github.com/plotly/plotly.R/pull/2221
110
+ args : ' c("--no-tests", "--no-manual", "--as-cran", "--no-multiarch")'
111
+ error-on : ' "warning"'
112
+
135
113
# - name: Show testthat output
136
114
# if: always()
137
115
# run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
138
116
# shell: bash
139
-
140
- - name : Don't use tar from old Rtools to store the cache
141
- if : ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
142
- shell : bash
143
- run : echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH
0 commit comments