Run all tests #49
Workflow file for this run
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
| name: Run all tests | |
| # Trying to use r2u container, thanks to Dirk at https://dirk.eddelbuettel.com/blog/2023/07/23/ | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| run_tests: | |
| description: 'Run all tests' | |
| required: true | |
| default: 'no' | |
| run_nCompile: | |
| description: 'Run nCompile tests' | |
| required: false | |
| default: 'yes' | |
| run_nCompile_features: | |
| description: 'Run nCompile feature tests' | |
| required: false | |
| default: 'yes' | |
| run_nClass: | |
| description: 'Run nClass tests' | |
| required: false | |
| default: 'yes' | |
| run_math: | |
| description: 'Run math tests' | |
| required: false | |
| default: 'no' | |
| run_tensorOps: | |
| description: 'Run tensorOps tests' | |
| required: false | |
| default: 'no' | |
| jobs: | |
| test-nCompile: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: rocker/r2u:latest | |
| if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_nCompile == 'yes' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: SessionInfo | |
| run: R -q -e 'sessionInfo()' | |
| - name: Install nimbleModel | |
| run: R -q -e 'remotes::install_github("https://github.com/perrydv/nimbleModel", subdir="nimbleModel", auth_token=Sys.getenv("GITHUB_TOKEN_NIMBLEMODEL"))' | |
| env: | |
| GITHUB_TOKEN_NIMBLEMODEL: ${{ secrets.GH_NM_PAT }} | |
| - name: Package Dependencies | |
| run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)' | |
| - name: Install inline | |
| run: R -q -e 'remotes::install_cran(c("inline", "nimble"))' | |
| - name: Build Package | |
| run: | | |
| R CMD build nCompiler | |
| R CMD INSTALL --install-tests nCompiler_*.tar.gz | |
| - name: Run nCompile and other tests | |
| run: | | |
| library(nCompiler) | |
| testthat::test_dir("nCompiler/tests/testthat/uncompiled_tests", reporter = "summary") | |
| testthat::test_dir("nCompiler/tests/testthat/nCompile_tests", reporter = "summary") | |
| testthat::test_dir("nCompiler/tests/testthat/cpp_tests", reporter = "summary") | |
| shell: Rscript {0} | |
| test-nCompile-features: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: rocker/r2u:latest | |
| if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_nCompile_features == 'yes' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: SessionInfo | |
| run: R -q -e 'sessionInfo()' | |
| - name: Package Dependencies | |
| run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)' | |
| - name: Install inline | |
| run: R -q -e 'remotes::install_cran("inline")' | |
| - name: Build Package | |
| run: | | |
| R CMD build nCompiler | |
| R CMD INSTALL --install-tests nCompiler_*.tar.gz | |
| - name: Run nCompile and other tests | |
| run: | | |
| library(nCompiler) | |
| testthat::test_dir("nCompiler/tests/testthat/predefined_tests", reporter = "summary") | |
| testthat::test_dir("nCompiler/tests/testthat/specificOp_tests", reporter = "summary") | |
| shell: Rscript {0} | |
| test-nClass: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: rocker/r2u:latest | |
| if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_nClass == 'yes' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: SessionInfo | |
| run: R -q -e 'sessionInfo()' | |
| #- name: System Dependencies | |
| # # can be used to install e.g. cmake or other build dependencies | |
| # run: apt update -qq && apt install --yes --no-install-recommends cmake git | |
| - name: Package Dependencies | |
| run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)' | |
| - name: Install inline | |
| run: R -q -e 'remotes::install_cran(c("inline", "nimble"))' | |
| - name: Build Package | |
| run: | | |
| R CMD build nCompiler | |
| R CMD INSTALL --install-tests nCompiler_*.tar.gz | |
| - name: Run nCompile and other tests | |
| run: | | |
| library(nCompiler) | |
| testthat::test_dir("nCompiler/tests/testthat/nimble_tests", reporter = "summary") | |
| testthat::test_dir("nCompiler/tests/testthat/nClass_tests", reporter = "summary") | |
| testthat::test_dir("nCompiler/tests/testthat/types_tests", reporter = "summary") | |
| testthat::test_dir("nCompiler/tests/testthat/serialization_tests", reporter = "summary") | |
| shell: Rscript {0} | |
| test-math: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: rocker/r2u:latest | |
| if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_math == 'yes' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: SessionInfo | |
| run: R -q -e 'sessionInfo()' | |
| #- name: System Dependencies | |
| # # can be used to install e.g. cmake or other build dependencies | |
| # run: apt update -qq && apt install --yes --no-install-recommends cmake git | |
| - name: Package Dependencies | |
| run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)' | |
| - name: Install inline | |
| run: R -q -e 'remotes::install_cran("inline")' | |
| - name: Build Package | |
| run: | | |
| R CMD build nCompiler | |
| R CMD INSTALL --install-tests nCompiler_*.tar.gz | |
| - name: Run nCompile and other tests | |
| run: | | |
| library(nCompiler) | |
| testthat::test_dir("nCompiler/tests/testthat/math_tests", reporter = "summary") | |
| shell: Rscript {0} | |
| test-tensorOps: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: rocker/r2u:latest | |
| if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_tensorOps == 'yes' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: SessionInfo | |
| run: R -q -e 'sessionInfo()' | |
| #- name: System Dependencies | |
| # # can be used to install e.g. cmake or other build dependencies | |
| # run: apt update -qq && apt install --yes --no-install-recommends cmake git | |
| - name: Package Dependencies | |
| run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)' | |
| - name: Install inline | |
| run: R -q -e 'remotes::install_cran(c("inline", "nimble"))' | |
| - name: Build Package | |
| run: | | |
| R CMD build nCompiler | |
| R CMD INSTALL --install-tests nCompiler_*.tar.gz | |
| - name: Run nCompile and other tests | |
| run: | | |
| library(nCompiler) | |
| testthat::test_dir("nCompiler/tests/testthat/tensorOps_tests", reporter = "summary") | |
| shell: Rscript {0} |