Testing with the openeo-test-api#166
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds continuous integration testing infrastructure using the openeo-test-api, enabling automated testing of the R client against a local test backend. The changes modify test configurations to run against localhost instead of production endpoints and introduce a new GitHub Actions workflow.
Changes:
- New GitHub Actions workflow that sets up and runs tests against openeo-test-api on localhost
- Modified test files to use localhost endpoint (http://127.0.0.1:8080) instead of production URLs
- Updated RoxygenNote version from 7.3.2 to 7.3.3
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| .github/workflows/tests.yml | New CI workflow that sets up R, Node.js, installs openeo-test-api, creates test user, and runs tests |
| tests/testthat/test-gee-test.R | Commented out skip statement and changed endpoint from production to localhost with hardcoded test credentials |
| tests/testthat/test-client.R | Changed connection test endpoint from openeo.cloud to localhost |
| DESCRIPTION | Updated RoxygenNote version from 7.3.2 to 7.3.3 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Additional task: #167 |
505c5c8 to
762278b
Compare
|
Hi, thanks for the pull request, but regarding the skipped tests, those are required to be skipped. When you send in a package at CRAN the package is build, the tests are run and some other documentation tests are done. In the package build and test stage at CRAN we have neither access to the host nor to internet resources. The tests are just reproducible and somewhat simple unit tests. In the past I have run those more complex tests on my local machine, before releasing the package to CRAN. |
|
@niebl Have you updated the PR according to Florians comments? |
|
To be more concrete here: Ideally we run the skipped tests in CI, if possible, but the tests would be skipped in the CRAN checks. |
|
Oh I understand now. in that case we should go back to the test.yml. These CI tests can however take up to half an hour to run. |
|
Why are the tests so slow? Are these some specific tests that do processing? Most tasks should be rather fast. |
|
the most overhead comes from the CI environment setup: Installing R and installing R-dependencies Locally running the tests leads to a lot more immediate results |
|
@flahn would the use of skip_on_cran() work in this case too? that could allow us to create a CI action for testing backend connections without interfering with CRAN |
|
I think I had been at this point in the past. I skipped the test completely instead only on CRAN, because before sending the package to CRAN I usually also run However I really like the idea of the CI pipeline, but maybe we should think the other way around. In which circumstances do we want to run the test? Looking at the testthat page the function |
That should definitely work better and has less risk of breaking workflows. I have pushed a commit that includes the according changes. The only issue I see is that testing within RStudio will skip the tests in question, but I don't believe that to be a significant problem as running those tests manually with the environment variable via |
1d26a9c to
eb070ce
Compare
Changes: