diff --git a/.github/workflows/old_workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml similarity index 100% rename from .github/workflows/old_workflows/R-CMD-check.yaml rename to .github/workflows/R-CMD-check.yaml diff --git a/.github/workflows/old_workflows/postgres-test.yaml b/.github/workflows/old_workflows/postgres-test.yaml deleted file mode 100644 index fe60334d..00000000 --- a/.github/workflows/old_workflows/postgres-test.yaml +++ /dev/null @@ -1,60 +0,0 @@ -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: postgres-test - -jobs: - R-CMD-check: - if: github.repository == 'darwin-eu/CDMConnector' || github.repository == 'darwin-eu-dev/CDMConnector' - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: true - matrix: - config: - - {os: macOS-latest, r: 'release'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - name: Install suggested packages - run: | - install.packages("DatabaseConnector") - install.packages("RPostgres") - install.packages("testthat") - shell: Rscript {0} - - - name: Install CirceR - run: | - install.packages("rJava") - install.packages("RJSONIO") - install.packages("CirceR", repos = "https://OHDSI.github.io/drat", type = "source") - install.packages("Capr", repos = "https://OHDSI.github.io/drat", type = "source") - shell: Rscript {0} - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - dependencies: '"hard"' - extra-packages: any::rcmdcheck - needs: check - - - name: Run tests on postgres - run: | - withr::with_envvar(new = c("CI_TEST_DB" = "postgres"), testthat::test_local()) - shell: Rscript {0} - - diff --git a/.github/workflows/old_workflows/redshift-test.yaml b/.github/workflows/old_workflows/redshift-test.yaml deleted file mode 100644 index 855361be..00000000 --- a/.github/workflows/old_workflows/redshift-test.yaml +++ /dev/null @@ -1,60 +0,0 @@ -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: redshift-test - -jobs: - R-CMD-check: - if: github.repository == 'darwin-eu/CDMConnector' - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: true - matrix: - config: - - {os: macOS-latest, r: 'release'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - name: Install suggested packages - run: | - install.packages("DatabaseConnector") - install.packages("RPostgres") - install.packages("testthat") - shell: Rscript {0} - - - name: Install CirceR - run: | - install.packages("rJava") - install.packages("RJSONIO") - install.packages("CirceR", repos = "https://OHDSI.github.io/drat", type = "source") - install.packages("Capr", repos = "https://OHDSI.github.io/drat", type = "source") - shell: Rscript {0} - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - dependencies: '"hard"' - extra-packages: any::rcmdcheck - needs: check - - - name: Run tests on redshift with RPostgres driver - run: | - withr::with_envvar(new = c("CI_TEST_DB" = "redshift"), testthat::test_local()) - shell: Rscript {0} - - diff --git a/.github/workflows/old_workflows/snowflake-odbc-test.yaml b/.github/workflows/old_workflows/snowflake-odbc-test.yaml deleted file mode 100644 index 6733c710..00000000 --- a/.github/workflows/old_workflows/snowflake-odbc-test.yaml +++ /dev/null @@ -1,59 +0,0 @@ -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: snowflake-odbc-test - -jobs: - R-CMD-check: - if: github.repository == 'darwin-eu/CDMConnector' - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: true - matrix: - config: - - {os: macOS-latest, r: 'release'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - name: Install suggested packages - run: | - install.packages("DatabaseConnector") - install.packages("testthat") - shell: Rscript {0} - - - name: Install CirceR - run: | - install.packages("rJava") - install.packages("RJSONIO") - install.packages("CirceR", repos = "https://OHDSI.github.io/drat", type = "source") - install.packages("Capr", repos = "https://OHDSI.github.io/drat", type = "source") - shell: Rscript {0} - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - dependencies: '"hard"' - extra-packages: any::rcmdcheck - needs: check - - - name: Run tests on Snowflake with odbc driver - run: | - withr::with_envvar(new = c("CI_TEST_DB" = "snowflake"), testthat::test_local()) - shell: Rscript {0} - - diff --git a/.github/workflows/old_workflows/sqlserver-odbc-test.yaml b/.github/workflows/old_workflows/sqlserver-odbc-test.yaml deleted file mode 100644 index c28ff0c5..00000000 --- a/.github/workflows/old_workflows/sqlserver-odbc-test.yaml +++ /dev/null @@ -1,59 +0,0 @@ -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: sqlserver-odbc-test - -jobs: - R-CMD-check: - if: github.repository == 'darwin-eu/CDMConnector' || github.repository == 'darwin-eu-dev/CDMConnector' - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: true - matrix: - config: - - {os: macOS-latest, r: 'release'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - name: Install suggested packages - run: | - install.packages("DatabaseConnector") - install.packages("testthat") - shell: Rscript {0} - - - name: Install CirceR - run: | - install.packages("rJava") - install.packages("RJSONIO") - install.packages("CirceR", repos = "https://OHDSI.github.io/drat", type = "source") - install.packages("Capr", repos = "https://OHDSI.github.io/drat", type = "source") - shell: Rscript {0} - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - dependencies: '"hard"' - extra-packages: any::rcmdcheck - needs: check - - - name: Run tests on MS SQL Server with odbc - run: | - withr::with_envvar(new = c("CI_TEST_DB" = "sqlserver"), testthat::test_local()) - shell: Rscript {0} - - diff --git a/tests/testthat/old_tests/test-cdmSubset.R b/tests/testthat/old_tests/test-cdmSubset.R index 77a995b2..14682070 100644 --- a/tests/testthat/old_tests/test-cdmSubset.R +++ b/tests/testthat/old_tests/test-cdmSubset.R @@ -159,7 +159,7 @@ # skip("required columns not found in cdm table condition_occurrence") # # con <- DBI::dbConnect(odbc::odbc(), -# Driver = "ODBC Driver 18 for SQL Server", +# Driver = Sys.getenv("SQL_SERVER_DRIVER"), # Server = Sys.getenv("CDM5_SQL_SERVER_SERVER"), # Database = Sys.getenv("CDM5_SQL_SERVER_CDM_DATABASE"), # UID = Sys.getenv("CDM5_SQL_SERVER_USER"), diff --git a/tests/testthat/old_tests/test-summariseQuantile.R b/tests/testthat/old_tests/test-summariseQuantile.R index 463a6865..0985aec3 100644 --- a/tests/testthat/old_tests/test-summariseQuantile.R +++ b/tests/testthat/old_tests/test-summariseQuantile.R @@ -434,7 +434,7 @@ # skip("manual test") # # con <- DBI::dbConnect(odbc::odbc(), -# Driver = "ODBC Driver 18 for SQL Server", +# Driver = Sys.getenv("SQL_SERVER_DRIVER"), # Server = Sys.getenv("CDM5_SQL_SERVER_SERVER"), # Database = Sys.getenv("CDM5_SQL_SERVER_CDM_DATABASE"), # UID = Sys.getenv("CDM5_SQL_SERVER_USER"), diff --git a/tests/testthat/test-zzz-dplyr.R b/tests/testthat/test-zzz-dplyr.R index 473283e2..35131c6b 100644 --- a/tests/testthat/test-zzz-dplyr.R +++ b/tests/testthat/test-zzz-dplyr.R @@ -89,7 +89,7 @@ # skip("manual test") # # con <- DBI::dbConnect(odbc::odbc(), -# Driver = "ODBC Driver 18 for SQL Server", +# Driver = Sys.getenv("SQL_SERVER_DRIVER"), # Server = Sys.getenv("CDM5_SQL_SERVER_SERVER"), # Database = Sys.getenv("CDM5_SQL_SERVER_CDM_DATABASE"), # UID = Sys.getenv("CDM5_SQL_SERVER_USER"),