Skip to content

Commit 27a07d5

Browse files
Create check-test-warnings.yaml
1 parent e19bc2c commit 27a07d5

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# based on test-coverage, running testthat with options(warn = 2) to fail on test warnings
2+
on:
3+
push:
4+
branches: [main, master]
5+
pull_request:
6+
branches: [main, master]
7+
8+
name: test-package
9+
10+
jobs:
11+
test-package:
12+
runs-on: ubuntu-latest
13+
env:
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: r-lib/actions/setup-r@v2
20+
with:
21+
use-public-rspm: true
22+
23+
- uses: r-lib/actions/setup-r-dependencies@v2
24+
with:
25+
extra-packages: local::.
26+
27+
- name: Run Tests
28+
run: |
29+
## --------------------------------------------------------------------
30+
options(
31+
crayon.enabled = TRUE,
32+
warn = 2L,
33+
warnPartialMatchArgs = TRUE,
34+
warnPartialMatchAttr = TRUE,
35+
warnPartialMatchDollar = TRUE
36+
)
37+
if (Sys.getenv("_R_CHECK_FORCE_SUGGESTS_", "") == "") Sys.setenv("_R_CHECK_FORCE_SUGGESTS_" = "false")
38+
testthat::test_dir("tests")
39+
shell: Rscript {0}

0 commit comments

Comments
 (0)