Skip to content

add coverage

add coverage #56

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.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("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/")
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())'