Skip to content

Commit

Permalink
Create check-test-warnings.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Jul 1, 2024
1 parent e19bc2c commit 27a07d5
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/check-test-warnings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# based on test-coverage, running testthat with options(warn = 2) to fail on test warnings
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-package

jobs:
test-package:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::.

- name: Run Tests
run: |
## --------------------------------------------------------------------
options(
crayon.enabled = TRUE,
warn = 2L,
warnPartialMatchArgs = TRUE,
warnPartialMatchAttr = TRUE,
warnPartialMatchDollar = TRUE
)
if (Sys.getenv("_R_CHECK_FORCE_SUGGESTS_", "") == "") Sys.setenv("_R_CHECK_FORCE_SUGGESTS_" = "false")
testthat::test_dir("tests")
shell: Rscript {0}

0 comments on commit 27a07d5

Please sign in to comment.