@@ -2,6 +2,9 @@ on: [push, pull_request]
22
33name : build
44
5+ permissions :
6+ contents : write
7+
58jobs :
69 build-r :
710 runs-on : ${{ matrix.config.os }}
@@ -12,82 +15,36 @@ jobs:
1215 fail-fast : false
1316 matrix :
1417 config :
15- - {os: windows-latest, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/latest"}
16- - {os: macOS-latest, r: 'release'}
17- - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
18- - {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
18+ - { os: macOS-latest, r: 'release' }
19+ - { os: windows-latest, r: 'release' }
20+ - { os: windows-latest, r: 'oldrel' }
21+ - { os: ubuntu-22.04, r: 'release', release: true }
22+ - { os: ubuntu-22.04, r: 'oldrel-1' }
1923
2024 env :
2125 R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
22- RSPM : ${{ matrix.config.rspm }}
2326
2427 steps :
25- - uses : actions/checkout@v2
28+ - uses : actions/checkout@v3
29+
30+ - uses : r-lib/actions/setup-pandoc@v2
2631
27- - uses : r-lib/actions/setup-r@v1
32+ - uses : r-lib/actions/setup-r@v2
2833 with :
2934 r-version : ${{ matrix.config.r }}
3035 http-user-agent : ${{ matrix.config.http-user-agent }}
36+ use-public-rspm : true
3137
32- - uses : r-lib/actions/setup-pandoc@v1
33-
34- - name : Query dependencies
35- run : |
36- install.packages('remotes')
37- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
38- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
39- shell : Rscript {0}
40-
41- - name : Cache R packages
42- if : runner.os != 'Windows'
43- uses : actions/cache@v2
38+ - uses : r-lib/actions/setup-r-dependencies@v2
4439 with :
45- path : ${{ env.R_LIBS_USER }}
46- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
47- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
48-
49- - name : Install system dependencies
50- if : runner.os == 'Linux'
51- run : |
52- while read -r cmd
53- do
54- eval sudo $cmd
55- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
40+ extra-packages : |
41+ any::rcmdcheck
5642
57- - name : Install dependencies
58- run : |
59- remotes::install_deps(dependencies = TRUE)
60- remotes::install_cran("rcmdcheck")
61- shell : Rscript {0}
62-
63- - name : Session info
64- run : |
65- options(width = 100)
66- pkgs <- installed.packages()[, "Package"]
67- sessioninfo::session_info(pkgs, include_base = TRUE)
68- shell : Rscript {0}
69-
70- - name : Check
71- env :
72- _R_CHECK_CRAN_INCOMING_ : false
73- run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
74- shell : Rscript {0}
75-
76- - name : Show testthat output
77- if : always()
78- run : find check -name 'testthat.Rout*' -exec cat '{}' \; || true
79- shell : bash
80-
81- - name : Upload check results
82- if : failure()
83- uses : actions/upload-artifact@main
84- with :
85- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
86- path : check
43+ - uses : r-lib/actions/check-r-package@v2
8744
8845 - name : Test coverage
8946 if : matrix.config.release
90- run : covr::codecov()
47+ run : covr::codecov(quiet = FALSE )
9148 shell : Rscript {0}
9249
9350 build-node :
@@ -96,23 +53,15 @@ jobs:
9653 name : Node.js
9754
9855 steps :
99- - uses : actions/checkout@v2
100-
101- - uses : actions/setup-node@v1
102- with :
103- node-version : 14.x
104-
105- - name : Cache node modules
106- uses : actions/cache@v2
107- with :
108- path : ~/.npm
109- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
110- restore-keys : |
111- ${{ runner.os }}-node-
112-
113- - name : Install dependencies
114- run : |
115- npm ci
116-
117- - name : Test
118- run : npm run test:cover
56+ - uses : actions/checkout@v3
57+
58+ - uses : actions/setup-node@v3
59+ with :
60+ node-version : ' 16'
61+ cache : ' npm'
62+
63+ - name : Install dependencies
64+ run : npm install
65+
66+ - name : Test
67+ run : npm run test:cover
0 commit comments