-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (39 loc) · 1.57 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
on:
push:
branches: [main, master, test]
pull_request:
branches: [main, master]
name: postgres-test
jobs:
Postgres-test:
# if: github.repository == 'darwin-eu/CDMConnector'
runs-on: ubuntu-latest
container:
image: executionengine.azurecr.io/darwin-base:v0.2
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: Run several R commands
run: |
print(getwd())
print(list.files())
shell: Rscript {0}
- name: Run tests on postgres with RPostgres driver
run: R -e 'withr::with_envvar(new = c("CI_TEST_DB" = "postgres"), testthat::test_local())'