autocommit #25
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
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
name: Test CDMConnector cdm_from_environment | |
jobs: | |
CDMConnector: | |
if: github.repository == 'darwin-eu-dev/AnalysisLibrary' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache Docker image layers | |
uses: actions/cache@v2 | |
with: | |
path: | | |
/var/lib/docker | |
key: ${{ runner.os }}-executionengine.azurecr.io/darwin-base:v0.1 | |
- name: pull docker image | |
run: docker pull executionengine.azurecr.io/darwin-base:v0.1 | |
- name: Run test | |
run: | | |
docker run --rm \ | |
-e DBMS_TYPE=postgresql \ | |
-e DATA_SOURCE_NAME=synpuf \ | |
-e CDM_VERSION=5.3 \ | |
-e DBMS_SERVER=${{ secrets.POSTGRESQL_SERVER }} \ | |
-e DBMS_PORT=${{ secrets.POSTGRESQL_PORT }} \ | |
-e DBMS_NAME=${{ secrets.POSTGRESQL_DBNAME }} \ | |
-e DBMS_USER=${{ secrets.POSTGRESQL_USER }} \ | |
-e DBMS_PASSWORD=${{ secrets.POSTGRESQL_PASSWORD }} \ | |
-e CDM_SCHEMA=${{ secrets.POSTGRESQL_CDM_SCHEMA }} \ | |
-e WRITE_SCHEMA=${{ secrets.POSTGRESQL_SCRATCH_SCHEMA }} \ | |
-p 80:80 \ | |
-v $(pwd)/TestCDMConnector:/tmp/TestCDMConnector \ | |
executionengine.azurecr.io/darwin-base:v0.1 \ | |
R -e 'con <- DBI::dbConnect(RPostgres::Postgres(), dbname = Sys.getenv("DBMS_NAME"), host = Sys.getenv("DBMS_SERVER"), user = Sys.getenv("DBMS_USER"), password = Sys.getenv("DBMS_PASSWORD")); DBI::dbDisconnect(con)' | |
- name: Cache Docker image layers | |
uses: actions/cache@v2 | |
with: | |
path: | | |
/var/lib/docker | |
key: ${{ runner.os }}-executionengine.azurecr.io/darwin-base:v0.1 |