Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 2.31 KB

File metadata and controls

67 lines (48 loc) · 2.31 KB

DataSHIELD logo

DataSHIELD packages tests’ status

dsbase test suite

This repository contains scripts to aggregate (source/parse_test_report.R) results from {testthat} and {covr} packages (see the workflow: https://github.com/datashield/.github). There is a script to render (source/render_docs.R) the results committed by the pipeline to the logs/ directory. Also, a template for a Quarto report (source/test_report.qmd) to present the results of the tests in a dashboard.

The workflow follows the following steps:

Repository with unit tests >>> Repository with results >>> GitHub pages


Render locally

  1. Parse ./logs/ and identify directories with a valid .xml file (testthat output).

    source("source/parse_logs.R")
  2. (Optional) To clear the repo from old intermediate outputs (Rds files), run the following before step 1:

    # delete old .Rds files in logs
    list.files("logs", ".Rds", ignore.case = TRUE, full.names = TRUE, recursive = TRUE) |>
      unlink()
    
    # delete old .csv files in logs
    list.files("logs", "results.csv", ignore.case = TRUE, full.names = TRUE, recursive = TRUE) |>
      unlink()
  3. Render a website with all the test results:

    Rscript --verbose --vanilla source/render_docs.R docs docs TRUE

Notes

  • The tests’ results for dsBaseClient v6.0.1 and v6.1 have a different format, so these have been excluded from future renders; logs were deleted in 1ab9d06fde39979c5ef3cf36dbfaff472795a1fc; as the regex created for newer versions of dsBaseClient was not compatible.