1
1
2
- if (requireNamespace(" tinytest" , quietly = TRUE ) &&
3
- utils :: packageVersion(" tinytest" ) > = " 1.0.0" ) {
2
+ if (requireNamespace(" tinytest" , quietly = TRUE )) {
4
3
5
4
# # Set a seed to make the test deterministic
6
5
set.seed(42 )
7
6
8
- # # R makes us to this
7
+ # # R makes us do this (but tinytest now sets it too)
9
8
Sys.setenv(" R_TESTS" = " " )
10
9
11
10
# # Force tests to be executed if in dev release which we define as
@@ -23,15 +22,20 @@ if (requireNamespace("tinytest", quietly=TRUE) &&
23
22
24
23
# # On Travis also always set tests; see
25
24
# # https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
26
- if ((Sys.getenv(" CI" ) == " true" ) ||
27
- (Sys.getenv(" TRAVIS" ) == " true" ) ||
28
- (Sys.getenv(" CONTINUOUS_INTEGRATION" ) == " true" )) {
25
+ # # GitHub Action also set CI variable; see
26
+ # # https://docs.github.com/en/actions/reference/environment-variables
27
+ # # (but we may not see these as we are in Docker)
28
+ # # Ensure Codecov runs full tests too
29
+ if ((Sys.getenv(" CI" ) == " true" ) ||
30
+ (Sys.getenv(" TRAVIS" ) == " true" ) ||
31
+ (Sys.getenv(" CONTINUOUS_INTEGRATION" ) == " true" ) ||
32
+ (Sys.getenv(" CODECOV_TOKEN" ) != " " )) {
29
33
if (Sys.getenv(" RunAllRcppTests" ) != " no" ) { # if env.var not yet set
30
- message(" Always enabling \" RunAllRcppTests\" =\" yes\" on Travis \n " )
34
+ message(" Always enabling \" RunAllRcppTests\" =\" yes\" in CI \n " )
31
35
Sys.setenv(" RunAllRcppTests" = " yes" )
32
36
}
33
37
if (Sys.getenv(" RunVerboseRcppTests" ) != " no" ) { # if env.var not yet set
34
- message(" Always enabling \" RunVerboseRcppTests\" =\" yes\" on Travis \n " )
38
+ message(" Always enabling \" RunVerboseRcppTests\" =\" yes\" in CI \n " )
35
39
Sys.setenv(" RunVerboseRcppTests" = " yes" )
36
40
}
37
41
}
0 commit comments