21
21
run_covr : ${{ true }}
22
22
run_pkgdown : ${{ false }}
23
23
has_runit : ${{ false }}
24
- has_latex : ${{ true }}
25
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24
+ has_latex : ${{ false }}
26
25
run_docker : ${{ false }}
26
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27
27
DOCKER_TOKEN : ${{ secrets.DOCKER_TOKEN }}
28
28
cache_version : cache-v1
29
+ enable_act : ${{ false }}
29
30
jobs :
30
31
rworkflows_static :
31
32
permissions :
59
60
GITHUB_REPO : ${{ github.repository }}
60
61
RGL_USE_NULL : ${{ true }}
61
62
steps :
62
- - name : Set GitHub environment variables
63
+ - name : " Set GitHub environment variables \U0001F3DE ️ "
63
64
run : |
64
65
echo "GITHUB_TOKEN=${{ env.GITHUB_TOKEN }}" >> $GITHUB_ENV
65
66
echo "RGL_USE_NULL=TRUE" >> $GITHUB_ENV
@@ -68,31 +69,31 @@ jobs:
68
69
echo "TZ=UTC" >> $GITHUB_ENV
69
70
echo "NOT_CRAN=${{ !env.as_cran }}" >> $GITHUB_ENV
70
71
shell : bash {0}
71
- - name : Set R library home on Linux
72
+ - name : " Set R library home on Linux \U0001F4DA "
72
73
if : runner.os == 'Linux'
73
74
run : |
74
75
mkdir -p /__w/_temp/Library
75
76
echo ".libPaths('/__w/_temp/Library')" > ~/.Rprofile
76
77
git config --global --add safe.directory '*'
77
78
shell : bash {0}
78
- - name : Checkout repository
79
- uses : actions/checkout@v3
80
- - name : Setup R and Bioconductor
79
+ - name : Checkout repository ⏬
80
+ uses : actions/checkout@v4
81
+ - name : " Setup R and Bioconductor \U0001F6E0 "
81
82
if : runner.os != 'Linux'
82
83
uses : grimbough/bioc-actions/setup-bioc@v1
83
84
with :
84
85
bioc-version : ${{ matrix.config.bioc }}
85
- - name : Setup pandoc from r-lib
86
+ - name : " Setup pandoc from r-lib \U0001F6E0 "
86
87
if : runner.os != 'Linux'
87
88
uses : r-lib/actions/setup-pandoc@v2
88
- - name : Query dependencies
89
+ - name : Query dependencies ❔
89
90
run : |
90
91
options(crayon.enabled = TRUE)
91
92
install.packages('remotes')
92
93
remotes::install_github("r-lib/remotes")
93
94
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
94
95
shell : Rscript {0}
95
- - name : Restore R package cache
96
+ - name : " Restore R package cache \U0001F3E6 "
96
97
if : |
97
98
!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'
98
99
uses : actions/cache@v3
@@ -102,7 +103,7 @@ jobs:
102
103
}}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
103
104
restore-keys : ${{ env.cache_version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc
104
105
}}-r-${{ matrix.config.r }}-
105
- - name : Cache R packages on Linux
106
+ - name : " Cache R packages on Linux \U0001F3E6 "
106
107
if : |
107
108
!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux'
108
109
uses : actions/cache@v3
@@ -112,15 +113,15 @@ jobs:
112
113
}}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
113
114
restore-keys : ${{ env.cache_version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc
114
115
}}-r-${{ matrix.config.r }}-
115
- - name : Install Linux system dependencies
116
+ - name : " Install Linux system dependencies \U0001F6E0 "
116
117
if : runner.os == 'Linux'
117
118
run : |
118
119
sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))')
119
120
echo $sysreqs
120
121
sudo -s eval "$sysreqs"
121
122
sudo apt-get install -y qpdf rsync
122
123
shell : bash {0}
123
- - name : Install macOS system dependencies
124
+ - name : " Install macOS system dependencies \U0001F6E0 "
124
125
if : runner.os == 'macOS'
125
126
run : |
126
127
#### --- Justifications for each package --- ####
@@ -148,30 +149,32 @@ jobs:
148
149
### Set up xml2 ###
149
150
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
150
151
shell : bash {0}
151
- - name : Install Windows system dependencies
152
+ - name : " Install Windows system dependencies \U0001F6E0 "
152
153
if : env.has_latex == 'true' && runner.os == 'Windows'
153
154
run : |
154
155
#### npm ####
155
156
npm install curl
156
157
shell : pwsh {0}
157
- - name : Install latex
158
+ - name : " Install latex \U0001F6E0 "
158
159
if : env.has_latex == 'true'
159
160
uses : r-lib/actions/setup-tinytex@v2
160
161
env :
161
- TINYTEX_INSTALLER : TinyTeX
162
- - name : Install additional LaTeX packages (non-Windows)
163
- if : env.has_latex == 'true' && runner.os != 'Windows'
164
- run : |
165
- tlmgr install bera nowidow parnotes marginfix etoolbox titlesec sectsty framed enumitem parskip soul placeins footmisc changepage xstring caption mathtools
166
- tlmgr list --only-installed
167
- shell : bash {0}
168
- - name : Install additional LaTeX packages (Windows)
169
- if : env.has_latex == 'true' && runner.os == 'Windows'
162
+ TINYTEX_INSTALLER : ${{ env.tinytex_installer }}
163
+ TINYTEX_VERSION : ${{ env.tinytex_version }}
164
+ - name : " Install latex \U0001F6E0 "
165
+ if : env.has_latex == 'true'
166
+ env :
167
+ tinytex_installer : ${{ env.tinytex_installer }}
168
+ tinytex_version : ${{ env.tinytex_version }}
170
169
run : |
171
- tlmgr install bera nowidow parnotes marginfix etoolbox titlesec sectsty framed enumitem parskip soul placeins footmisc changepage xstring caption mathtools
172
- tlmgr list --only-installed
173
- shell : pwsh
174
- - name : Install dependencies pass 1
170
+ install.packages("tinytex")
171
+ extra_packages <- c("bera","nowidow","parnotes","marginfix","etoolbox",
172
+ "titlesec","sectsty","framed","enumitem","parskip","soul","placeins",
173
+ "footmisc","changepage","xstring","caption","mathtools","fancyhdr",
174
+ "preprint","ragged2e","pdfcrop","titling","silence","everysel")
175
+ tinytex::tlmgr_install(pkgs = extra_packages)
176
+ shell : Rscript {0}
177
+ - name : " Install dependencies pass 1 \U0001F6E0 "
175
178
env :
176
179
timeout : ${{ env.timeout }}
177
180
run : |
@@ -184,7 +187,7 @@ jobs:
184
187
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE)
185
188
continue-on-error : ${{ true }}
186
189
shell : Rscript {0}
187
- - name : Install dependencies pass 2
190
+ - name : " Install dependencies pass 2 \U0001F6E0 "
188
191
env :
189
192
timeout : ${{ env.timeout }}
190
193
run : |
@@ -193,25 +196,25 @@ jobs:
193
196
repos <- BiocManager::repositories()
194
197
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE)
195
198
shell : Rscript {0}
196
- - name : Install RUnit (via BiocGenerics)
199
+ - name : " Install RUnit (via BiocGenerics) \U0001F6E0 "
197
200
if : env.has_runit == 'true'
198
201
run : |
199
202
options(crayon.enabled = TRUE)
200
203
BiocManager::install("BiocGenerics")
201
204
shell : Rscript {0}
202
- - name : Install covr
205
+ - name : " Install covr \U0001F6E0 "
203
206
if : env.run_covr == 'true' && runner.os == 'Linux'
204
207
run : |
205
208
options(crayon.enabled = TRUE)
206
209
install.packages("covr")
207
210
shell : Rscript {0}
208
- - name : Install pkgdown
211
+ - name : " Install pkgdown \U0001F6E0 "
209
212
if : env.run_pkgdown == 'true' && runner.os == 'Linux'
210
213
run : |
211
214
options(crayon.enabled = TRUE)
212
215
install.packages("pkgdown")
213
216
shell : Rscript {0}
214
- - name : Session info
217
+ - name : Session info ℹ️
215
218
run : |
216
219
options(width = 100, crayon.enabled = TRUE)
217
220
pkgs <- installed.packages()[,"Package"]
@@ -220,7 +223,7 @@ jobs:
220
223
sessioninfo::session_info(pkgs, include_base = TRUE)
221
224
}, error = function(x){utils::sessionInfo()})
222
225
shell : Rscript {0}
223
- - name : Run CMD check
226
+ - name : Run CMD check ✅
224
227
if : env.run_rcmdcheck == 'true'
225
228
env :
226
229
_R_CHECK_CRAN_INCOMING_ : ${{ false }}
@@ -233,27 +236,28 @@ jobs:
233
236
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
234
237
if(!require("rcmdcheck", quietly=TRUE)) install.packages("rcmdcheck")
235
238
as_cran <- if(Sys.getenv("AS_CRAN")=='true') "--as-cran" else NULL
239
+ run_build_vignettes <- if(Sys.getenv("run_vignettes")=='true') NULL else "--no-build-vignettes"
236
240
run_vignettes <- if(Sys.getenv("run_vignettes")=='true') NULL else "--ignore-vignettes"
237
241
rcmdcheck::rcmdcheck(
238
242
args = c("--no-manual", "--timings", as_cran, run_vignettes),
239
- build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data"),
243
+ build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data", run_build_vignettes ),
240
244
error_on = "warning",
241
245
check_dir = "check")
242
246
shell : Rscript {0}
243
- - name : Reveal testthat details
247
+ - name : " Reveal testthat details \U0001F4CB "
244
248
if : env.has_testthat == 'true'
245
249
run : |
246
250
find . -name testthat.Rout -exec cat '{}' ';'
247
251
shell : bash {0}
248
- - name : Run RUnit tests (via BiocGenerics)
252
+ - name : " Run RUnit tests (via BiocGenerics) \U0001F4CB "
249
253
if : env.has_runit == 'true'
250
254
env :
251
255
timeout : ${{ env.timeout }}
252
256
run : |
253
257
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
254
258
BiocGenerics:::testPackage()
255
259
shell : Rscript {0}
256
- - name : Run BiocCheck
260
+ - name : Run BiocCheck ✅
257
261
if : env.run_bioccheck == 'true'
258
262
env :
259
263
DISPLAY : 99.0
@@ -278,16 +282,16 @@ jobs:
278
282
`no-check-CRAN` = as_cran,
279
283
`no-check-bioc-help` = as_cran)
280
284
shell : Rscript {0}
281
- - name : Test coverage
285
+ - name : " Test coverage \U0001F4CB "
282
286
if : env.run_covr == 'true' && runner.os == 'Linux'
283
287
run : |
284
288
covr::codecov()
285
289
shell : Rscript {0}
286
- - name : Install package
290
+ - name : " Install package \U0001F6E0 ️ "
287
291
if : env.run_pkgdown == 'true' && runner.os == 'Linux'
288
292
run : R CMD INSTALL .
289
293
shell : bash {0}
290
- - name : Get R package info
294
+ - name : Get R package info ℹ️
291
295
if : runner.os == 'Linux'
292
296
run : |
293
297
#### DockerHub repos must be lowercase (,,) ####
@@ -299,7 +303,7 @@ jobs:
299
303
echo "packageVersion=${version}" >> $GITHUB_ENV
300
304
echo $version
301
305
shell : bash {0}
302
- - name : Render README
306
+ - name : " Render README \U0001F4E6 "
303
307
if : env.run_pkgdown == 'true' && runner.os == 'Linux'
304
308
env :
305
309
DISPLAY : 99.0
@@ -310,35 +314,36 @@ jobs:
310
314
rmarkdown::render("README.Rmd", output_format = rmarkdown::github_document(html_preview = FALSE));
311
315
}
312
316
shell : Rscript {0}
313
- - name : Build pkgdown site
317
+ - name : " Build pkgdown site \U0001F4E6 "
314
318
if : env.run_pkgdown == 'true' && runner.os == 'Linux'
315
319
run : |
320
+ options(crayon.enabled = TRUE)
316
321
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
317
322
shell : Rscript {0}
318
- - name : " Deploy pkgdown site to GitHub pages \U0001F680 "
323
+ - name : " Deploy pkgdown site to GitHub pages \U0001F4E6 \ U0001F680"
319
324
if : env.run_pkgdown == 'true' && runner.os == 'Linux'
320
325
uses : JamesIves/github-pages-deploy-action@releases/v4
321
326
with :
322
327
clean : ${{ false }}
323
328
branch : gh-pages
324
329
folder : docs
325
330
token : ${{ env.GITHUB_TOKEN }}
326
- - name : Upload check results
331
+ - name : Upload check results ⏫
327
332
if : failure()
328
333
uses : actions/upload-artifact@v3
329
334
with :
330
335
name : ${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r
331
336
}}-results
332
337
path : check
333
- - name : Create Docker file
338
+ - name : " Create Docker file \U0001F433 "
334
339
if : |
335
340
(!contains(github.event.head_commit.message, '/nodocker')) && env.run_docker == 'true' && runner.os == 'Linux'
336
341
run : |
337
342
options(crayon.enabled = TRUE)
338
343
if(!require("rworkflows", quietly=TRUE)) remotes::install_github("neurogenomics/rworkflows")
339
344
path <- rworkflows::use_dockerfile()
340
345
shell : Rscript {0}
341
- - name : Build and push to DockerHub
346
+ - name : " Build and push to DockerHub \U0001F433 \U0001F680 "
342
347
if : |
343
348
(!contains(github.event.head_commit.message, '/nodocker')) && env.run_docker == 'true' && runner.os == 'Linux'
344
349
uses : docker/build-push-action@v1
0 commit comments