Skip to content

Compliance, CRAN packaging, UDP graphs, and cloud deploy #58

Compliance, CRAN packaging, UDP graphs, and cloud deploy

Compliance, CRAN packaging, UDP graphs, and cloud deploy #58

Workflow file for this run

name: openeocraft Unit Tests
on:
pull_request:
branches:
- dev
jobs:
test:
name: Run R Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- name: Setup R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
extra-packages: |
any::remotes
any::testthat
- name: Install openstac (dev with main fallback)
run: |
tryCatch(
remotes::install_url("https://github.com/Open-Earth-Monitor/openstac/archive/refs/heads/dev.tar.gz"),
error = function(e) {
message("openstac dev tarball unavailable, falling back to main: ", conditionMessage(e))
remotes::install_url("https://github.com/Open-Earth-Monitor/openstac/archive/refs/heads/main.tar.gz")
}
)
shell: Rscript {0}
- name: Install package
run: |
remotes::install_local(".", dependencies = FALSE, upgrade = "never")
if (!requireNamespace("testthat", quietly = TRUE)) {
stop("testthat was not installed successfully.")
}
shell: Rscript {0}
- name: Run tests
run: |
testthat::test_local(reporter = "summary")
shell: Rscript {0}