-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (47 loc) · 2.2 KB
/
postgres-test.yaml
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
54
55
56
on:
push:
branches: [main, master, test, develop]
pull_request:
branches: [main, master, develop]
name: postgres-test
jobs:
Postgres-test:
# if: github.repository == 'darwin-eu/CDMConnector'
runs-on: ubuntu-latest
container:
image: executionengine.azurecr.io/darwin-base:v0.3
env:
CDM5_POSTGRESQL_USER: ${{ secrets.CDM5_POSTGRESQL_USER }}
CDM5_POSTGRESQL_PORT: ${{ secrets.CDM5_POSTGRESQL_PORT }}
CDM5_POSTGRESQL_PASSWORD: ${{ secrets.CDM5_POSTGRESQL_PASSWORD }}
CDM5_POSTGRESQL_SERVER: ${{ secrets.CDM5_POSTGRESQL_SERVER }}
CDM5_POSTGRESQL_HOST: ${{ secrets.CDM5_POSTGRESQL_HOST }}
CDM5_POSTGRESQL_DBNAME: ${{ secrets.CDM5_POSTGRESQL_DBNAME }}
CDM5_POSTGRESQL_CDM_SCHEMA: ${{ secrets.CDM5_POSTGRESQL_CDM_SCHEMA }}
CDM5_POSTGRESQL_OHDSI_SCHEMA: ${{ secrets.CDM5_POSTGRESQL_OHDSI_SCHEMA }}
CDM5_POSTGRESQL_SCRATCH_SCHEMA: ${{ secrets.CDM5_POSTGRESQL_SCRATCH_SCHEMA }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
name: Postgres test (RPostgres driver)
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: Run a simple shell command
run: ls
- name: Run one R command
run: R -e "getwd()"
- name: Install Packages
run: |
print(getwd())
print(list.files())
install.packages("gert", repos = "https://cloud.r-project.org/")
install.packages("usethis", repos = "https://cloud.r-project.org/")
install.packages("devtools", repos = "https://cloud.r-project.org/")
install.packages("omopgenerics", repos = "https://cloud.r-project.org/")
install.packages("palmerpenguins", repos = "https://cloud.r-project.org/")
install.packages("tictoc", repos = "https://cloud.r-project.org/")
CDMConnector::download_eunomia_data()
print(paste("eunomia_is_available():", CDMConnector::eunomia_is_available()))
shell: Rscript {0}
- name: Run tests on postgres with RPostgres driver
run: R -e 'devtools::install(); withr::with_envvar(new = c("CI_TEST_DB" = "postgres"), testthat::test_local())'