Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove environment variables for testing ckanr on Github actions #212

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/R-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CKANR_TEST_URL: ${{secrets.CKANR_TEST_URL}}
CKANR_TEST_BEHAVIOUR: ${{secrets.CKANR_TEST_BEHAVIOUR}}
CKANR_TEST_BEHAVIOUR: SKIP
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
R_KEEP_PKG_SOURCE: yes
CKAN_VERSION: ${{ matrix.config.ckan-version }} # for docker compose up
Expand Down
4 changes: 1 addition & 3 deletions tests/testthat/helper-ckanr.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ check_organization <- function(url, x){
}
}

u <- get_test_url()
Copy link
Contributor

@florianm florianm May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we were to let get_test_url() have a default value that works here (i.e. "http://localhost:5000"), we could remove the environment secret from the GH repo as well as the env variable CKANR_TEST_URL in workflow R-check.yaml.


if (ping(u)) {
if (ping("http://localhost:5000")) {
prepare_test_ckan()
} else {
message("CKAN is offline. Running tests that don't depend on CKAN.")
Expand Down
Loading