Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGR
Commits
cf5cac4c
Commit
cf5cac4c
authored
Nov 23, 2020
by
Dorchies David
Browse files
ci: move regression_tests.R to testthat subdirectory to avoid execution by `R CMD CHECK`
Refs
#69
parent
7f1e4f9c
Pipeline
#17773
passed with stages
in 12 minutes and 29 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
cf5cac4c
...
...
@@ -34,9 +34,10 @@ default:
.regression
:
stage
:
regression
script
:
-
Rscript tests/regression_tests.R stable
-
Rscript tests/regression_tests.R dev
-
Rscript tests/regression_tests.R compare
-
Rscript tests/testthat/regression_tests.R stable
-
R CMD INSTALL .
-
Rscript tests/testthat/regression_tests.R dev
-
Rscript tests/testthat/regression_tests.R compare
.check_not_cran
:
stage
:
tests
...
...
tests/testthat/helper_regression.R
View file @
cf5cac4c
...
...
@@ -10,7 +10,6 @@ StoreDevExampleResults <- function(
package
=
"airGR"
,
path
=
file.path
(
"tests/tmp"
,
Sys.getenv
(
"R_VERSION"
),
"dev"
),
...
)
{
devtools
::
install
()
StoreExampleResults
(
package
=
package
,
path
=
path
,
...
)
}
...
...
tests/testthat/regression.R
View file @
cf5cac4c
...
...
@@ -38,7 +38,7 @@ if (dir.exists(file.path(tmp_path, "stable")) & dir.exists(file.path(tmp_path, "
lapply
(
X
=
refVarFiles
,
CompareWithStable
,
testDir
=
file.path
(
tmp_path
,
"dev"
),
regIgnore
=
regIgnore
)
}
else
{
stop
(
"Regression tests compared to released version needs that you run the following instructions first:\n"
,
"Rscript
-e 'source(\"
tests/testthat/
store_examples.R\"); StoreStableExampleResults(\"airGR\");'
\n"
,
"R CMD INSTALL .\n"
,
"Rscript
-e 'source(\"
tests/testthat/
store_examples.R\"); StoreDevExampleResults(\"airGR\");'\n
"
)
"Rscript tests/testthat/
regression_tests.R stable
\n"
,
"R CMD INSTALL .\n"
,
"Rscript tests/testthat/
regression_tests.R dev
"
)
}
tests/regression_tests.R
→
tests/
testthat/
regression_tests.R
View file @
cf5cac4c
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment