-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathREADME.Rmd
More file actions
63 lines (43 loc) · 2.5 KB
/
README.Rmd
File metadata and controls
63 lines (43 loc) · 2.5 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
<a href='https://datashield.org'><img src='https://i0.wp.com/datashield.org/wp-content/uploads/2024/07/DS-logo-A4.png' alt='DataSHIELD logo' align='right' height=70px/></a>
# DataSHIELD packages tests' status
<!-- badges: start -->
[](https://github.com/villegar/dsBase/actions/workflows/dsBase_test_suite.yaml)
<!-- badges: end -->
This repository contains scripts to aggregate ([source/parse_test_report.R](source/parse_test_report.R)) results from [`{testthat}`](https://cran.r-project.org/package=testthat) and [`{covr}`](https://cran.r-project.org/package=covr) packages (see the workflow: [https://github.com/datashield/.github](https://github.com/datashield/.github)). There is a script to render ([source/render_docs.R](source/render_docs.R)) the results committed by the pipeline to the [logs/](logs/) directory. Also, a template for a Quarto report ([source/test_report.qmd](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`
<br />
#### Render locally
1. Parse `./logs/` and identify directories with a valid `.xml` file (`testthat` output).
```{r, eval = FALSE}
source("source/parse_logs.R")
```
2. (Optional) To clear the repo from old intermediate outputs (`Rds` files), run
the following before step 1:
```{r, eval = FALSE}
# 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:
```{sh, eval = FALSE}
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](https://github.com/datashield/testStatus/commit/1ab9d06fde39979c5ef3cf36dbfaff472795a1fc); as the regex created for newer versions of
`dsBaseClient` was not compatible.