@@ -28,16 +28,17 @@ jobs:
2828 config :
2929 - {os: macOS-latest, r: 'release', visual_tests: true, node: "14.x", shinytest: true}
3030 - {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'}
3334 # 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'}
3840
3941 env :
40- RSPM : ${{ matrix.config.rspm }}
4142 VISUAL_TESTS : ${{ matrix.config.visual_tests }}
4243 SHINYTEST : ${{ matrix.config.shinytest }}
4344 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
@@ -48,43 +49,19 @@ jobs:
4849 steps :
4950 - uses : actions/checkout@v2
5051
51- - uses : r-lib/actions/setup-r@v1
52+ - uses : r-lib/actions/setup-r@v2
5253 id : install-r
5354 with :
5455 r-version : ${{ matrix.config.r }}
55- http-user-agent : ${{ matrix.config.http-user-agent }}
56+ use-public-rspm : true
5657
57- - uses : r-lib/actions/setup-pandoc@v1
58+ - uses : r-lib/actions/setup-pandoc@v2
5859
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
6761 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
7364
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-
8865 - name : Set up Python 3.8
8966 uses : actions/setup-python@v2
9067 with :
11087 - name : Run Tests
11188 run : |
11289 options(crayon.enabled = TRUE, testthat.progress.max_fails=1000)
113- if (!require(devtools)) pak::pak("devtools")
114- if (!require(reshape2)) pak::pak("reshape2")
11590 res <- devtools::test()
11691 df <- as.data.frame(res)
11792 if (sum(df$failed) > 0 || any(df$error)) stop("GHA CI tests failed")
@@ -125,19 +100,17 @@ jobs:
125100 name : ${{ runner.os }}-r${{ matrix.config.r }}-results
126101 path : ./
127102
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+
135113 # - name: Show testthat output
136114 # if: always()
137115 # run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
138116 # 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