-
Notifications
You must be signed in to change notification settings - Fork 20
45 lines (38 loc) · 1.33 KB
/
cran-check-api.yaml
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
on:
schedule:
- cron: '00 01 * * *'
name: checkcran
jobs:
checkcran:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
- name: Install system dependencies
run: sudo apt-get install -y libcurl4-openssl-dev
- name: Install packages
run: |
install.packages(c("projmgr", "remotes", "knitr"))
remotes::install_github("ropenscilabs/cchecks")
shell: Rscript {0}
- name: Check CRAN and create issue
run: |
library(cchecks)
library(projmgr)
chk <- cchecks::cch_pkgs(x = gsub(".*/","",Sys.getenv('GITHUB_REPOSITORY')))$data$checks
problems <- chk[chk$status != "OK", ]
if (nrow(problems) > 0) {
repo_ref <- create_repo_ref("ropensci", "tidyhydat")
existing_issue_titles <- parse_issues(get_issues(repo_ref))$title
if (!any(existing_issue_titles %in% "CRAN CHECK PROBLEMS")) {
post_issue(repo_ref,
title = "CRAN CHECK PROBLEMS",
body = paste0(knitr::kable(chk), collapse = "\n"),
labels = "cran-error",
assignees = "boshek"
)
}
}
shell: Rscript {0}