Skip to content

Add FHIR Resolution section to pkgdown documentation #58

Add FHIR Resolution section to pkgdown documentation

Add FHIR Resolution section to pkgdown documentation #58

on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
workflow_dispatch: # Allow manual triggering
name: integration-tests
jobs:
integration:
# Only run on push to main/develop, not on PRs (saves ~7-8 min per PR)
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
OMOPHUB_API_KEY: ${{ secrets.OMOPHUB_API_KEY }}
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
# Install only the runtime + test dependencies the integration tests
# actually need. The default `needs: check` pulls in all Suggests
# (rmarkdown, knitr, etc.) which require heavy system libraries
# (pandoc, libxml2-dev, cmake, libharfbuzz-dev, ...) and take 10+
# minutes to install. Integration tests only need httr2 + testthat.
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::testthat, any::devtools
dependencies: '"hard"'
cache-version: 2
- name: Run integration tests
run: |
devtools::load_all()
integration_files <- list.files(
"tests/testthat",
pattern = "^test-.*-integration[.]R$",
full.names = TRUE
)
cat("Found", length(integration_files), "integration test files\n")
results <- lapply(integration_files, function(f) {
cat("\n========================================\n")
cat("Running:", basename(f), "\n")
cat("========================================\n\n")
testthat::test_file(f)
})
# Check for failures
failures <- sum(sapply(results, function(r) sum(as.data.frame(r)$failed)))
if (failures > 0) {
stop(paste(failures, "test(s) failed"))
}
shell: Rscript {0}
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: integration-test-failures
path: tests/testthat/