File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : checktor
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : read
8+
9+ concurrency :
10+ group : checktor-${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ checktor :
15+ runs-on : ubuntu-latest
16+
17+ env :
18+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
19+ R_KEEP_PKG_SOURCE : yes
20+
21+ steps :
22+ - name : Check out repository
23+ uses : actions/checkout@v7
24+
25+ - name : Set up R
26+ uses : r-lib/actions/setup-r@v2
27+ with :
28+ use-public-rspm : true
29+
30+ - name : Install checktor
31+ uses : r-lib/actions/setup-r-dependencies@v2
32+ with :
33+ extra-packages : |
34+ checktor
35+ needs : check
36+
37+ - name : Run checktor
38+ shell : Rscript {0}
39+ run : |
40+ results <- checktor::checktor(verbose = TRUE)
41+ healthy <- checktor::is_healthy(results)
42+
43+ report <- checktor::health_report(
44+ results,
45+ format = "markdown"
46+ )
47+
48+ summary <- Sys.getenv("GITHUB_STEP_SUMMARY")
49+
50+ heading <- if (healthy) {
51+ "## ✅ checktor passed"
52+ } else {
53+ "## ❌ checktor found issues"
54+ }
55+
56+ writeLines(
57+ c(
58+ heading,
59+ "",
60+ report,
61+ ""
62+ ),
63+ summary
64+ )
65+
66+ if (!healthy) {
67+ checktor::prescribe(results)
68+ stop("checktor found issues.", call. = FALSE)
69+ }
70+
You can’t perform that action at this time.
0 commit comments