Skip to content

Commit 0ccd25d

Browse files
authored
Merge pull request #111 from ropensci/more_covr
Fix coverage
2 parents e4813e4 + 2c4eb27 commit 0ccd25d

4 files changed

Lines changed: 11 additions & 84 deletions

File tree

.github/workflows/test-coverage.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ jobs:
9898
plugins: noop
9999
token: ${{ secrets.CODECOV_TOKEN }}
100100

101+
- name: Upload coverage report to Coveralls
102+
uses: coverallsapp/github-action@v2
103+
with:
104+
github-token: ${{ secrets.GITHUB_TOKEN }}
105+
file: ./cobertura.xml
106+
# Fail if error if not on PR
107+
fail-on-error: ${{ github.event_name != 'pull_request' }}
108+
101109
- name: Show testthat output
102110
if: always()
103111
run: |

.github/workflows/test-coveralls.yaml

Lines changed: 0 additions & 77 deletions
This file was deleted.

R/utils.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ print_snapshot <- function(title = "----", obj) {
5252
}
5353

5454
get_avail_on_init <- function() {
55-
avail_on_init
55+
avail_on_init # nocov
5656
}
5757

5858
#' Search for a package in available repositories.
@@ -203,7 +203,8 @@ guess_cff_part <- function(x) {
203203
# Look at the first element.
204204
guess <- guess_cff_named_part(x[[1]])
205205

206-
fin <- switch(guess,
206+
fin <- switch(
207+
guess,
207208
"cff_pers" = "cff_pers_lst",
208209
"cff_ref" = "cff_ref_lst",
209210
"unclear"

tests/testthat/test-utils.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,3 @@ test_that("Use right repo", {
3737
final <- detect_repos(repos)
3838
expect_identical(final, c(CRAN = "https://cloud.r-project.org/"))
3939
})
40-
41-
test_that("Avail on init", {
42-
avail_top2 <- avail_on_init[c(1, 2), 1]
43-
expect_identical(avail_top2, get_avail_on_init()[c(1, 2), 1])
44-
})

0 commit comments

Comments
 (0)