ci: skip live external-reference tests by default in CI - #1002
Conversation
Add a testthat helper (helper-live.R) that skips tests requiring live downloads unless EPATADA_RUN_LIVE_TESTS=true and internet is available. Call the helper from live-reference tests in test-WQPWQXATTAINSCSTRefs.R. This prevents CI flakes when external downloads fail.
for more information, see https://pre-commit.ci
|
coverage-report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 788acdf |
|
Quick thoughts:
|
I recently started to add skip_if_offline to some tests that fail intermittently: # For WQP
testthat::skip_if_offline("www.waterqualitydata.us")
# For Expert Query:
testthat::skip_if_offline("gispub.epa.gov")Let's discuss and pick one since they are both for testing live internet connection?
It may be a good idea to have a mix of both but skip the "integration" tests if the server/service is down? |
This branch and PR were generated by Copilot based on error in #1001. Add a testthat helper (helper-live.R) that skips tests requiring live downloads unless EPATADA_RUN_LIVE_TESTS=true and internet is available. Call the helper from live-reference tests in test-WQPWQXATTAINSCSTRefs.R. This prevents CI flakes when external downloads fail.
Pull Request Checklist (convert PR to draft if in progress)
Required
Update your branch from the latest
developand resolve any merge conflictsRun devtools::test(), devtools::check(), and devtools::document() locally; ensure tests pass and fix any errors, warnings, or notes. Add new dependencies to
DESCRIPTIONand document appropriatelyAdd/update vignettes for corresponding changes in functionality, list these under articles in _pkgdown.yml, and ensure added/updated vignettes run and build with proper formatting locally
Request review from at least one developer team member (convert PR to ready for review if it was designated as in progress)
Best practices
Include a summary of the changes made and relevant context/motivation
Link issues to auto-close on merge (use Development sidebar or include "Closes #" in the PR)
Refresh inline/block comments for clarity
Update roxygen docs and include examples; review help pages
Add/update tests in
tests/testthat; review the bot's coverage report from test-coverage and confirm all changes are coveredConditional
If there is a bot spelling comment, run spelling::spell_check_package() locally and fix any misspellings; add approved project terms to WORDLIST with spelling::update_wordlist()
If tests fail suggesting internal reference files need a refresh, run
.TADA_UpdateRefFiles()and.TADA_UpdateExampleData()locally viaMaintenanceScheduled.Ror trigger the Component File Update GitHub ActionIf new example data files were added, document them in
ExampleData.Rand include them inMaintenanceScheduled.Rfor regular refreshIf columns were added/updated, update
RequiredCols.RIf changes affect other package or the shiny app functions, update those impacted functions accordingly