-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
75 lines (66 loc) · 1.7 KB
/
Taskfile.yml
File metadata and controls
75 lines (66 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "3"
env:
NOT_CRAN: "true"
vars:
R_SOURCE: R/*
VIGNETTES: vignettes/**/*.Rmd
tasks:
setup-dev:
desc: Install tools for development.
deps:
- install-r-tools
install-r-tools:
internal: true
env:
PKG_SYSREQS: FALSE
desc: Install R packages for development.
cmds:
- Rscript -e
'pak::repo_add(
cran = "https://cloud.r-project.org/",
rpolars = "https://rpolars.r-universe.dev"
);
pak::local_install_deps(dependencies = c("all", "Config/Needs/dev", "Config/Needs/website"))'
build-all:
desc: Build the R package, generate documents, run all tests, and update files.
deps:
- build-documents
cmds:
- task: test-all
- task: build-readme
build-documents:
desc: Build the R package and generate documents.
internal: true
sources:
- "{{.R_SOURCE}}"
generates:
- NAMESPACE
- man/*.Rd
status:
- Rscript -e 'if (desc::desc_get("RoxygenNote") < packageVersion("roxygen2")) quit(status = 1)'
cmds:
- Rscript -e 'library(dplyr); library(dbplyr); devtools::document()'
build-readme:
internal: true
desc: Build README.md
sources:
- README.Rmd
- "{{.R_SOURCE}}"
generates:
- README.md
cmds:
- Rscript -e
'devtools::load_all();
rmarkdown::render(input = "README.Rmd", output_file = "README.md")'
test-all:
desc: Run all tests.
cmds:
- task: test-examples
test-examples:
desc: Check if examples can be run.
internal: true
sources:
- "{{.R_SOURCE}}"
- DESCRIPTION
cmds:
- Rscript -e 'devtools::load_all(); devtools::run_examples(document = FALSE)'