-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (47 loc) · 1.78 KB
/
devtools_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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}