Store the expected number of test rows in the Trained* objects. #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
name: Comparison to R | |
jobs: | |
build: | |
name: Compare to R reference | |
runs-on: ubuntu-latest | |
container: rocker/rstudio:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get latest CMake | |
uses: lukka/get-cmake@latest | |
- name: Configure the build | |
run: cmake -S . -B build -DBUILD_TESTING=OFF | |
- name: Set directories | |
run: | | |
echo "R_PKG_DIR=${R_HOME}/site-library" >> $GITHUB_ENV | |
- name: Restore the package directory | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.R_PKG_DIR }} | |
key: preinstalled-packages | |
- name: Install dependencies | |
shell: Rscript {0} | |
run: install.packages(c("Rcpp", "testthat")) | |
- name: Install the test package | |
run: R CMD INSTALL tests/R | |
- name: Run the comparisons | |
shell: Rscript {0} | |
run: | | |
setwd("tests/R/tests") | |
testthat::test_file("testthat.R", stop_on_failure=TRUE) |