FDS-1412 htan demo prep #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Devtools Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev* | |
jobs: | |
build: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
r-version: ['4.1.1'] | |
env: | |
SYNAPSE_PAT: ${{ secrets.SYNAPSE_PAT }} | |
SCHEMATIC_URL_DEV: https://schematic-dev.api.sagebionetworks.org | |
SCHEMATIC_URL_STAGING: https://schematic-staging.api.sagebionetworks.org | |
SCHEMATIC_URL_PROD: https://schematic.api.sagebionetworks.org | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up R ${{ matrix.r-version }} | |
uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a | |
with: | |
r-version: ${{ matrix.r-version }} | |
- name: Install dependencies | |
run: | | |
install.packages(c("remotes", "rcmdcheck", "devtools")) | |
remotes::install_deps(dependencies = TRUE) | |
shell: Rscript {0} | |
- name: Add schematic base URL to Renviron | |
run: | | |
refName <- Sys.getenv("GITHUB_REF_NAME") | |
if (grepl("v[0-9]+.[0-9]+.[0-9]+", refName)) { | |
message("Testing using production schematic API instance") | |
renviron <- "DFA_SCHEMATIC_API_URL = '${{ env.SCHEMATIC_URL_PROD }}'" | |
} else if (refName == "main") { | |
renviron <- "DFA_SCHEMATIC_API_URL = '${{ env.SCHEMATIC_URL_STAGING }}'" | |
message("Testing using staging schematic API instance") | |
} else { | |
renviron <- "DFA_SCHEMATIC_API_URL = '${{ env.SCHEMATIC_URL_DEV }}'" | |
message("Testing using dev schematic API instance") | |
} | |
# write .Renviron | |
writeLines(renviron, ".Renviron") | |
shell: Rscript {0} | |
- name: Check | |
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") | |
shell: Rscript {0} |