Skip to content

Commit

Permalink
Enable tests on Github actions using secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwarkentin committed Aug 12, 2024
1 parent bfb0adf commit aa76b80
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- name: Setup .Renviron for testing
run: |
echo OPENMPP_REMOTE_URL="$OPENMPP_REMOTE_URL" >> ~/.Renviron
echo OPENMPP_REMOTE_USER="$OPENMPP_REMOTE_USER" >> ~/.Renviron
echo OPENMPP_REMOTE_PWD="$OPENMPP_REMOTE_PWD" >> ~/.Renviron
shell: bash
env:
OPENMPP_REMOTE_URL: ${{ secrets.OPENMPP_REMOTE_URL }}
OPENMPP_REMOTE_USER: ${{ secrets.OPENMPP_REMOTE_USER }}
OPENMPP_REMOTE_PWD: ${{ secrets.OPENMPP_REMOTE_PWD }}

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
1 change: 0 additions & 1 deletion tests/testthat/test-APIConnections.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ test_that("Should fail with no API connection", {

test_that("Should work with no API connection", {
skip_on_cran()
skip_on_ci()
use_OpenMpp_remote()
expect_no_error(get_models())
expect_no_error(get_models_list())
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ClassModel.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Tests OpenMppModel class", {
skip_on_cran()
skip_on_ci()

# Setup
use_OpenMpp_remote()
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ClassModelRun.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Tests OpenMppModelRun class", {
skip_on_cran()
skip_on_ci()

# Setup
use_OpenMpp_remote()
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ClassModelRunSet.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Tests OpenMppModelRunSet class", {
skip_on_cran()
skip_on_ci()

# Setup
use_OpenMpp_remote()
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ClassWorkset.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Tests OpenMppWorkset class", {
skip_on_cran()
skip_on_ci()

# Setup
use_OpenMpp_remote()
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ModelMetadata.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Get model", {
skip_on_cran()
skip_on_ci()
model_name <- get_models()$Name[[1]]
expect_type(get_model(model_name), 'list')
})
1 change: 0 additions & 1 deletion tests/testthat/test-ModelRuns.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Test model run accessors", {
skip_on_cran()
skip_on_ci()
model_name <- get_models()$Name[[1]]
run_name <- get_model_runs(model_name)$Name[[1]]
expect_type(get_run(model_name, run_name), 'list')
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ModelWorkset.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Get workset", {
skip_on_cran()
skip_on_ci()
model_name <- get_models()$Name[[1]]
workset_name <- get_worksets(model_name)$Name[[1]]
expect_type(get_workset(model_name, workset_name), 'list')
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-RunOptions.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("Test run options", {
skip_on_cran()
skip_on_ci()
opts <- opts_run()
expect_s3_class(opts, c("OpenMppRunOpts", "list"))
expect_output(print(opts))
Expand Down

0 comments on commit aa76b80

Please sign in to comment.