Guard against integer overflow when realizing an integer compact_seq. #80
This file contains hidden or 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: Run tests | |
| jobs: | |
| test: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| container: rocker/rstudio:latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get latest CMake | |
| uses: lukka/get-cmake@latest | |
| - name: Install Zlib | |
| run: apt-get update && apt-get install zlib1g-dev | |
| - name: Configure the build | |
| run: cmake -S . -B build | |
| - name: Run the build | |
| run: cmake --build build | |
| - 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 | |
| - name: Run the tests | |
| shell: Rscript {0} | |
| run: | | |
| setwd("tests/tests") | |
| testthat::test_file("testthat.R", stop_on_failure=TRUE) |