Skip to content
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
9 changes: 6 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ jobs:
config:
- os: ubuntu-22.04
r: 4.0.5
rspm: 'https://packagemanager.posit.co/cran/__linux__/jammy/2024-02-06'
- os: ubuntu-22.04
r: 4.2.3
r: 4.4.2
- os: ubuntu-22.04
r: 4.3.1
r: 4.5.1
- os: ubuntu-latest
r: release
env:
Expand All @@ -35,6 +36,8 @@ jobs:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
extra-repositories: 'https://mpn.metworx.com/snapshots/stable/${{ env.MPN_LATEST }}'
env:
RSPM: ${{ matrix.config.rspm }}
- name: Install additional system dependencies
shell: bash
run: sudo apt-get install libpoppler-cpp-dev
Expand All @@ -43,7 +46,7 @@ jobs:
extra-packages: |
any::pkgdown
any::rcmdcheck
upgrade: 'TRUE'
upgrade: ${{ matrix.config.r == '4.0.5' && 'FALSE' || 'TRUE' }}
- uses: r-lib/actions/check-r-package@v2
- name: Check pkgdown
shell: Rscript {0}
Expand Down
13 changes: 10 additions & 3 deletions tests/testthat/test-create-extra-notes.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("creating extra notes", {
expect_equal(unique(extra_notes_data$cov_results_df$test_coverage), 100)
expect_equal(unique(extra_notes_data$cov_results_df$code_file), "R/myscript.R")
# Confirm values - R CMD Check
expect_true(grepl("Status: OK", extra_notes_data$check_output))
expect_match(extra_notes_data$check_output, "Status: OK", fixed = TRUE)

})

Expand All @@ -22,10 +22,17 @@ describe("creating extra notes", {
extra_notes_data <- create_extra_notes(result_dir_x)

# Confirm values - covr
expect_true(grepl("cannot open", unique(extra_notes_data$cov_results_df$test_coverage)))

if (packageVersion("covr") < "3.6.5") {
fail_pat <- "cannot open"
} else {
fail_pat <- "installation did not succeed"
}

expect_match(extra_notes_data$cov_results_df$test_coverage, fail_pat, fixed = TRUE)
expect_identical(extra_notes_data$cov_results_df$code_file, "File coverage failed")
# Confirm values - R CMD Check
expect_true(grepl("ERROR", extra_notes_data$check_output))
expect_match(extra_notes_data$check_output, "ERROR", fixed = TRUE)
})

it("create_extra_notes - no coverage results", {
Expand Down