snowflake: runtime driver config checks #650
Workflow file for this run
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: | |
- master | |
- main | |
pull_request: | |
branches: | |
- master | |
- main | |
name: DBs (Windows) | |
jobs: | |
testthat-Windows: | |
runs-on: windows-latest | |
name: ${{ matrix.database }} | |
strategy: | |
fail-fast: false | |
matrix: | |
database: | |
- SQLServer | |
- MySQL | |
- PostgreSQL | |
- SQLite | |
env: | |
CRAN: "https://packagemanager.rstudio.com/cran/latest" | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
- name: Install SQL Server | |
if: matrix.database == 'SQLServer' | |
uses: potatoqualitee/[email protected] | |
with: | |
install: sqlengine, sqlclient | |
version: 2019 | |
sa-password: Password12 | |
show-log: true | |
- name: Install SQL Server Driver | |
if: matrix.database == 'SQLServer' | |
run: | | |
echo "ODBC_CS_SQLSERVER=Driver={ODBC Driver 17 for SQL Server};Server=localhost;Uid=sa;Pwd=Password12" >> $env:GITHUB_ENV | |
- name: Install MySQL | |
if: matrix.database == 'MySQL' | |
uses: ankane/setup-mysql@v1 | |
with: | |
database: test | |
- name: Install MySQL Driver | |
if: matrix.database == 'MySQL' | |
run: | | |
choco install mysql.odbc | |
echo "ODBC_CS_MYSQL=Driver={MySQL ODBC 9.0 ANSI Driver};Server=127.0.0.1;Database=test;User=root;Password=" >> $env:GITHUB_ENV | |
- name: Install PostgreSQL | |
if: matrix.database == 'PostgreSQL' | |
uses: ankane/setup-postgres@v1 | |
with: | |
database: test | |
- name: Install PostgreSQL Driver | |
if: matrix.database == 'PostgreSQL' | |
run: | | |
choco install psqlodbc | |
echo "ODBC_CS_POSTGRES=Driver={PostgreSQL ANSI(x64)};Server=localhost;Port=5432;BoolsAsChar=0;LFConversion=0;Database=test;UID=postgres;PWD=" >> $env:GITHUB_ENV | |
- name: Install SQLite | |
if: matrix.database == 'SQLite' | |
run: | | |
(New-Object Net.WebClient).DownloadFile('http://www.ch-werner.de/sqliteodbc/sqliteodbc_w64.exe', 'sqliteodbc_w64.exe') | |
./sqliteodbc_w64.exe /S | |
- name: Install SQLite Driver | |
if: matrix.database == 'SQLite' | |
run: | | |
echo "ODBC_CS_SQLITE=Driver={SQLite3 ODBC Driver};Database=${{ runner.temp }}\test;Timeout=2000" >> $env:GITHUB_ENV | |
- name: Install dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
needs: check | |
- name: Install locally to avoid error with test_local() | |
run: | | |
install.packages(".", repos = NULL, type = "source") | |
shell: Rscript {0} | |
- name: Test | |
run: | | |
options("odbc.interruptible"=TRUE);testthat::test_local(reporter = testthat::ProgressReporter$new(max_failures = Inf, update_interval = Inf)) | |
shell: Rscript {0} |