Skip to content

Commit dd621a2

Browse files
committed
update new test yaml to run all tests and rename it
1 parent 1b509d4 commit dd621a2

2 files changed

Lines changed: 117 additions & 44 deletions

File tree

.github/workflows/test-all.yaml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Run all tests
2+
# Trying to use r2u container, thanks to Dirk at https://dirk.eddelbuettel.com/blog/2023/07/23/
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
run_tests:
8+
description: 'Run all tests'
9+
required: true
10+
default: 'yes'
11+
12+
jobs:
13+
test-nCompile:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: rocker/r2u:latest
17+
if: github.event.inputs.run_tests == 'yes'
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: SessionInfo
21+
run: R -q -e 'sessionInfo()'
22+
- name: Package Dependencies
23+
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
24+
- name: Install inline
25+
run: R -q -e 'remotes::install_cran("inline", "nimble")'
26+
- name: Build Package
27+
run: |
28+
R CMD build nCompiler
29+
R CMD INSTALL --install-tests nCompiler_*.tar.gz
30+
- name: Run nCompile and other tests
31+
run: |
32+
library(nCompiler)
33+
testthat::test_dir("nCompiler/tests/testthat/uncompiled_tests", reporter = "summary")
34+
testthat::test_dir("nCompiler/tests/testthat/nCompile_tests", reporter = "summary")
35+
testthat::test_dir("nCompiler/tests/testthat/cpp_tests", reporter = "summary")
36+
testthat::test_dir("nCompiler/tests/testthat/specificOp_tests", reporter = "summary")
37+
shell: Rscript {0}
38+
39+
test-nClass:
40+
runs-on: ubuntu-latest
41+
container:
42+
image: rocker/r2u:latest
43+
if: github.event.inputs.run_tests == 'yes'
44+
steps:
45+
- uses: actions/checkout@v3
46+
- name: SessionInfo
47+
run: R -q -e 'sessionInfo()'
48+
#- name: System Dependencies
49+
# # can be used to install e.g. cmake or other build dependencies
50+
# run: apt update -qq && apt install --yes --no-install-recommends cmake git
51+
- name: Package Dependencies
52+
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
53+
- name: Install inline
54+
run: R -q -e 'remotes::install_cran("inline")'
55+
- name: Build Package
56+
run: |
57+
R CMD build nCompiler
58+
R CMD INSTALL --install-tests nCompiler_*.tar.gz
59+
- name: Run nCompile and other tests
60+
run: |
61+
library(nCompiler)
62+
testthat::test_dir("nCompiler/tests/testthat/nClass_tests", reporter = "summary")
63+
testthat::test_dir("nCompiler/tests/testthat/types_tests", reporter = "summary")
64+
testthat::test_dir("nCompiler/tests/testthat/serialization_tests", reporter = "summary")
65+
shell: Rscript {0}
66+
67+
test-math:
68+
runs-on: ubuntu-latest
69+
container:
70+
image: rocker/r2u:latest
71+
if: github.event.inputs.run_tests == 'yes'
72+
steps:
73+
- uses: actions/checkout@v3
74+
- name: SessionInfo
75+
run: R -q -e 'sessionInfo()'
76+
#- name: System Dependencies
77+
# # can be used to install e.g. cmake or other build dependencies
78+
# run: apt update -qq && apt install --yes --no-install-recommends cmake git
79+
- name: Package Dependencies
80+
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
81+
- name: Install inline
82+
run: R -q -e 'remotes::install_cran("inline")'
83+
- name: Build Package
84+
run: |
85+
R CMD build nCompiler
86+
R CMD INSTALL --install-tests nCompiler_*.tar.gz
87+
- name: Run nCompile and other tests
88+
run: |
89+
library(nCompiler)
90+
testthat::test_dir("nCompiler/tests/testthat/math_tests", reporter = "summary")
91+
shell: Rscript {0}
92+
93+
test-tensorOps:
94+
runs-on: ubuntu-latest
95+
container:
96+
image: rocker/r2u:latest
97+
if: github.event.inputs.run_tests == 'yes'
98+
steps:
99+
- uses: actions/checkout@v3
100+
- name: SessionInfo
101+
run: R -q -e 'sessionInfo()'
102+
#- name: System Dependencies
103+
# # can be used to install e.g. cmake or other build dependencies
104+
# run: apt update -qq && apt install --yes --no-install-recommends cmake git
105+
- name: Package Dependencies
106+
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
107+
- name: Install inline
108+
run: R -q -e 'remotes::install_cran("inline")'
109+
- name: Build Package
110+
run: |
111+
R CMD build nCompiler
112+
R CMD INSTALL --install-tests nCompiler_*.tar.gz
113+
- name: Run nCompile and other tests
114+
run: |
115+
library(nCompiler)
116+
testthat::test_dir("nCompiler/tests/testthat/tensorOps_tests", reporter = "summary")
117+
shell: Rscript {0}

.github/workflows/test-debugging.yaml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)