Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRWN-280 add GH workflows #18

Merged
merged 7 commits into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
^pkgdown$
^_pkgdown\.yml$

^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
43 changes: 43 additions & 0 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# R CMD check workflow
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rcmdcheck

- uses: r-lib/actions/check-r-package@v1
30 changes: 30 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Code coverage workflow
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov(quiet = FALSE, line_exclusions = "R/plot.R")
shell: Rscript {0}
3,300 changes: 1,650 additions & 1,650 deletions inst/extdata/Binless/stats_l.csv

Large diffs are not rendered by default.

3,300 changes: 1,650 additions & 1,650 deletions inst/extdata/Binless/strat_stats_l.csv

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions tests/testthat/test-binless.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ test_that("cont vpc binless vpcstats are correct", {

stats <- fread(location, colClasses = c(qname = "factor"))

str(stats)

str(vpc$stats)
#Check for equality, dispatches to data.table::all.equal method
testthat::expect_identical(all.equal(vpc$stats, stats), TRUE)
expect_equal(vpc$stats, stats)

})

Expand Down Expand Up @@ -73,7 +76,7 @@ test_that("cont vpc binless stratification vpcstats are correct", {
stats <- fread(location, colClasses = c(qname = "factor"))

#Check for equality, dispatches to data.table::all.equal method
testthat::expect_identical(all.equal(vpc$stats, stats), TRUE)
expect_equal(vpc$stats, stats)

})

Expand Down Expand Up @@ -124,7 +127,7 @@ test_that("cat vpc binless vpcstats are correct", {


#Check for equality, dispatches to data.table::all.equal method
testthat::expect_identical(all.equal(vpc$stats, stats), TRUE)
expect_equal(vpc$stats, stats)

})

Expand All @@ -148,7 +151,7 @@ test_that("cat vpc binless stratification vpcstats are correct", {


#Check for equality, dispatches to data.table::all.equal method
testthat::expect_identical(all.equal(vpc$stats, stats), TRUE)
expect_equal(vpc$stats, stats)

})

Expand Down