-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.drone.yml
34 lines (31 loc) · 1.7 KB
/
.drone.yml
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
kind: pipeline
name: default
steps:
- name: test
image: brazildatacube/r-webservices:1.0.0
commands:
- R -e 'install.packages("pacman");pacman::p_load(desc::desc_get_deps()[desc::desc_get_deps()[["type"]] != "Depends",][["package"]], install = T, update = F, character.only = T)'
- R -e 'v<-gsub("(>) |(>=) ", "", desc::desc_get_deps()[desc::desc_get_deps()[["type"]] != "Depends" & desc::desc_get_deps()[["version"]] != "*", ][["version"]]); pacman::p_install_version(package = desc::desc_get_deps()[desc::desc_get_deps()[["type"]] != "Depends" & desc::desc_get_deps()[["version"]] != "*", ][["package"]], version = v)'
- R CMD build .
- set -e; R CMD check *.tar.gz --as-cran >&1 | tee stdfile && cat stdfile | (grep -E "(WARNING|ERROR)" > /dev/null) && exit 1 || exit 0
- name: coverage
image: brazildatacube/r-webservices:1.0.0
environment:
CODECOV_TOKEN:
from_secret: codecov_token
commands:
- R -e 'install.packages("pacman");pacman::p_load(desc::desc_get_deps()[desc::desc_get_deps()[["type"]] != "Depends",][["package"]], install = T, update = F, character.only = T)'
- R -e 'v<-gsub("(>) |(>=) ", "", desc::desc_get_deps()[desc::desc_get_deps()[["type"]] != "Depends" & desc::desc_get_deps()[["version"]] != "*", ][["version"]]); pacman::p_install_version(package = desc::desc_get_deps()[desc::desc_get_deps()[["type"]] != "Depends" & desc::desc_get_deps()[["version"]] != "*", ][["package"]], version = v)'
- R -e 'withr::with_envvar(c(NOT_CRAN="true"), covr::codecov(quiet = FALSE))'
when:
event:
- push
- name: discord-notify
image: brazildatacube/bdc-drone-discord
settings:
webhook:
from_secret: discord_webhook
when:
status:
- failure
- success