@@ -23,32 +23,26 @@ jobs:
23
23
fail-fast : false
24
24
matrix :
25
25
config :
26
- - {os: macos-11 , r: 'release', rspm: "https://packagemanager.rstudio.com/all/latest" }
27
- - {os: macos-10.15 , r: 'oldrel', rspm: "https://packagemanager.rstudio.com/all/latest" }
28
- - {os: ubuntu-20.04 , r: 'devel', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
29
- - {os: ubuntu-20.04 , r: 'release', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
30
- - {os: ubuntu-20.04 , r: 'oldrel', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
26
+ - {os: macos-13 , r: 'release', not_cran: 'true' }
27
+ - {os: macos-12 , r: 'oldrel', not_cran: 'true' }
28
+ - {os: ubuntu-latest , r: 'devel', not_cran: 'true',}
29
+ - {os: ubuntu-latest , r: 'release', not_cran: 'true'}
30
+ - {os: ubuntu-latest , r: 'oldrel', not_cran: 'true'}
31
31
32
32
env :
33
33
R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
34
34
RSPM : ${{ matrix.config.rspm }}
35
35
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
36
36
37
37
steps :
38
- - uses : actions/checkout@v2
38
+ - uses : actions/checkout@v4
39
39
40
- - uses : r-lib/actions/setup-r@v1
40
+ - uses : r-lib/actions/setup-r@v2
41
41
with :
42
42
r-version : ${{ matrix.config.r }}
43
43
http-user-agent : ${{ matrix.config.http-user-agent }}
44
44
45
- - uses : r-lib/actions/setup-pandoc@v1
46
-
47
- - name : Install remotes
48
- run : |
49
- install.packages('remotes')
50
- saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
51
- shell : Rscript {0}
45
+ - uses : r-lib/actions/setup-pandoc@v2
52
46
53
47
- name : Cache R packages
54
48
if : runner.os != 'Windows'
@@ -58,58 +52,38 @@ jobs:
58
52
key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
59
53
restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
60
54
61
- - name : Install system dependencies
62
- if : runner.os == 'Linux'
63
- run : |
64
- while read -r cmd
65
- do
66
- eval sudo $cmd
67
- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
68
-
69
- - name : Install ghostscript (Linux)
70
- if : runner.os == 'Linux'
71
- run : |
72
- sudo apt-get install -y ghostscript
73
- sudo apt-get install -y curl
74
-
75
- - name : Install dependencies
76
- run : |
77
- remotes::install_deps(dependencies = TRUE)
78
- remotes::install_cran("rcmdcheck")
79
- remotes::install_cran("covr")
80
- shell : Rscript {0}
55
+ - uses : r-lib/actions/setup-r-dependencies@v2
56
+ with :
57
+ extra-packages : |
58
+ any::rcmdcheck
59
+ any::covr
60
+ needs : check
81
61
82
- - name : Session info
83
- run : |
84
- options(width = 100)
85
- pkgs <- installed.packages()[, "Package"]
86
- sessioninfo::session_info(pkgs, include_base = TRUE)
87
- shell : Rscript {0}
62
+ - uses : r-lib/actions/check-r-package@v2
63
+ with :
64
+ upload-snapshots : true
88
65
89
- - name : Remove depends.Rds
66
+ - name : Test coverage
90
67
run : |
91
- unlink("depends.Rds")
92
- shell : Rscript {0}
93
-
94
- - name : Check
95
- env :
96
- _R_CHECK_CRAN_INCOMING_ : false
97
- run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
68
+ covr::codecov(
69
+ quiet = FALSE,
70
+ clean = TRUE,
71
+ token = "${{ secrets.CODECOV_TOKEN }}",
72
+ install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
73
+ )
98
74
shell : Rscript {0}
99
75
100
76
- name : Show testthat output
101
77
if : always()
102
- run : find check -name 'testthat.Rout*' -exec cat '{}' \; || true
78
+ run : |
79
+ ## --------------------------------------------------------------------
80
+ find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
103
81
shell : bash
104
82
105
- - name : Upload check results
83
+ - name : Upload test results
106
84
if : failure()
107
- uses : actions/upload-artifact@main
85
+ uses : actions/upload-artifact@v4
108
86
with :
109
- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
110
- path : check
87
+ name : coverage-test-failures
88
+ path : ${{ runner.temp }}/package
111
89
112
- - name : Test coverage
113
- run : |
114
- covr::codecov()
115
- shell : Rscript {0}
0 commit comments