Skip to content

Commit

Permalink
Merge branch 'dev' into jt-776-fix_avaiable_pkg_lst
Browse files Browse the repository at this point in the history
  • Loading branch information
jthompson-arcus committed Jul 10, 2024
2 parents caa65e2 + df1813b commit ff7628e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -9,6 +9,8 @@ on:

name: test-coverage

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
Expand All @@ -24,21 +26,45 @@ jobs:
sudo apt-get update
sudo apt-get install -y texlive-xetex
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
use-public-rspm: false
r-version: 'renv'

- uses: r-lib/actions/setup-renv@v2

- name: Install riskassessment
shell: bash
run: R CMD INSTALL --preclean .

- name: Test coverage
run: covr::codecov()
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Added navigation controls in Function Explorer tab (#644)
* Fixed bug that crashed the Package Dependencies page for pkgs without any dependency info available (#802)
* Fixed bug that incorrectly displayed 0 dependencies as 1 (#805)

# riskassessment 3.1.0

Expand Down
2 changes: 1 addition & 1 deletion R/utils_insert_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ insert_riskmetric_to_db <- function(pkg_name, pkg_version = "",

metric_value <- case_when(
"pkg_metric_error" %in% class(riskmetric_assess[[metric$name]][[1]]) ~ "pkg_metric_error",
metric$name == "dependencies" ~ as.character(length(unlist(as.vector(riskmetric_assess[[metric$name]][[1]][1])))),
metric$name == "dependencies" ~ as.character(NROW(riskmetric_assess[[metric$name]][[1]])),
metric$name == "reverse_dependencies" ~ as.character(length(as.vector(riskmetric_assess[[metric$name]][[1]]))),
metric$is_perc == 1L ~ as.character(round(riskmetric_score[[metric$name]]*100, 2)[[1]]),
TRUE ~ as.character(riskmetric_assess[[metric$name]][[1]][1:length(riskmetric_assess[[metric$name]])])
Expand Down
8 changes: 4 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4367,7 +4367,7 @@
"Maintainer": "Kevin Ushey <[email protected]>",
"Repository": "RSPM",
"Date/Publication": "2024-02-29 01:10:07 UTC",
"Built": "R 4.3.3; ; 2024-07-09 14:01:48 UTC; unix"
"Built": "R 4.3.3; ; 2024-07-10 13:11:46 UTC; unix"
}
},
"reprex": {
Expand Down Expand Up @@ -6175,7 +6175,7 @@
"checksum": "d74482ddef0a4941a51c077f5ea60e10"
},
".github/workflows/test-coverage.yaml": {
"checksum": "c0baef024db9ec1299aae4098e904e9c"
"checksum": "a854cdb9e1cfbcbbf5ccffdf4755606b"
},
".github/workflows/write-manifest.yaml": {
"checksum": "cdfc1470af653982867daed2b99d5b97"
Expand Down Expand Up @@ -6463,7 +6463,7 @@
"checksum": "97d1232340e04c53088bc8f814133dcd"
},
"NEWS.md": {
"checksum": "72bdae63c42eb2750d86e97fc0996a79"
"checksum": "2273640b8da14304bc919f4fc83a58d7"
},
"R/app_config.R": {
"checksum": "c2b61f270b86b6833f0ee39c44a1a440"
Expand Down Expand Up @@ -6574,7 +6574,7 @@
"checksum": "6c0e6fb4b3716cdd0c0d2953a1cf4393"
},
"R/utils_insert_db.R": {
"checksum": "2c02e4eab4d9262ef8c8e64eb0f1b4f5"
"checksum": "5eaa94311e33014f000eb3cc5aec8282"
},
"R/utils_startup.R": {
"checksum": "b689ee96f0761480ac65ca22cbbb4980"
Expand Down

0 comments on commit ff7628e

Please sign in to comment.