-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcodecov.R
31 lines (26 loc) · 841 Bytes
/
codecov.R
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
library(testthat)
library(covr)
library(queryparser)
pkg_result <- package_coverage()
env_result_base <- environment_coverage(
env = with(
queryparser:::translation_environment_direct_base,
queryparser:::translation_environment_indirect_base
),
test_files <- paste0("tests/testthat/",list.files("tests/testthat/", pattern = "\\.R$"))
)
env_result_tidy <- environment_coverage(
env = with(
queryparser:::translation_environment_direct_tidyverse,
queryparser:::translation_environment_indirect_tidyverse
),
test_files <- paste0("tests/testthat/",list.files("tests/testthat/", pattern = "\\.R$"))
)
result <- structure(c(
pkg_result,
env_result_base,
env_result_tidy
), class = "coverage")
attr(result, "package") <- attr(pkg_result, "package")
attr(result, "relative") <- TRUE
codecov(coverage = result)