-
Nemanja Glumac authored
* Migrate BigQuery SDK driver test to GitHub Actions * Migrate Google related classpath drivers test to GitHub Actions * Multi-line strings are not working? * Provide BQ envs
Nemanja Glumac authored* Migrate BigQuery SDK driver test to GitHub Actions * Migrate Google related classpath drivers test to GitHub Actions * Multi-line strings are not working? * Provide BQ envs
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
drivers.yml 14.51 KiB
name: Driver Tests
on:
push:
branches:
- 'master'
- 'release-**'
paths-ignore:
- "docs/**"
- "**.md"
# frontend and E2E tests
- "**/frontend/test/**"
- "**/frontend/**.unit.*"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "docs/**"
- "**.md"
# frontend and E2E tests
- "**/frontend/test/**"
- "**/frontend/**.unit.*"
jobs:
be-tests-athena-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: athena
MB_ATHENA_TEST_REGION: us-east-1
MB_ATHENA_TEST_ACCESS_KEY: ${{ secrets.MB_ATHENA_TEST_ACCESS_KEY }}
MB_ATHENA_TEST_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_SECRET_KEY }}
MB_ATHENA_TEST_S3_STAGING_DIR: ${{ secrets.MB_ATHENA_TEST_S3_STAGING_DIR }}
steps:
- uses: actions/checkout@v3
- name: Test Athena driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-athena-ee'
be-tests-bigquery-cloud-sdk-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: bigquery-cloud-sdk
MB_BIGQUERY_TEST_PROJECT_ID: ${{ secrets.BIGQUERY_TEST_PROJECT_ID }}
MB_BIGQUERY_TEST_CLIENT_ID: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_ID }}
MB_BIGQUERY_TEST_CLIENT_SECRET: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_SECRET }}
MB_BIGQUERY_TEST_ACCESS_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_ACCESS_TOKEN }}
MB_BIGQUERY_TEST_REFRESH_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_REFRESH_TOKEN }}
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON }}
steps:
- uses: actions/checkout@v3
- name: Test BigQuery Cloud SDK driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-bigquery-cloud-sdk-ee'
be-tests-druid-ee:
if: github.event.pull_request.draft == false
runs-on: buildjet-2vcpu-ubuntu-2004
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: druid
services:
druid:
image: metabase/druid:0.20.2
ports:
- "8082:8082"
env:
CLUSTER_SIZE: nano-quickstart
steps:
- uses: actions/checkout@v3
- name: Test Druid driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-druid-ee'
be-tests-googleanalytics-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: googleanalytics
steps:
- uses: actions/checkout@v3
- name: Test Google Analytics driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-googleanalytics-ee'
be-tests-google-related-classpath-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
matrix:
driver: ['googleanalytics', 'bigquery-cloud-sdk']
env:
CI: 'true'
DRIVERS: ${{ matrix.driver }}
MB_BIGQUERY_TEST_PROJECT_ID: ${{ secrets.BIGQUERY_TEST_PROJECT_ID }}
MB_BIGQUERY_TEST_CLIENT_ID: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_ID }}
MB_BIGQUERY_TEST_CLIENT_SECRET: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_SECRET }}
MB_BIGQUERY_TEST_ACCESS_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_ACCESS_TOKEN }}
MB_BIGQUERY_TEST_REFRESH_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_REFRESH_TOKEN }}
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON }}
steps:
- uses: actions/checkout@v3
- name: Test Google Related Classpath drivers
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-${{ matrix.driver }}-classpath-ee'
test-args: ':only "[metabase.query-processor-test.expressions-test metabase.driver.google-test metabase.driver.googleanalytics-test]"'
be-tests-mariadb-10-2-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: mysql
MB_DB_TYPE: mysql
MB_DB_HOST: localhost
MB_DB_PORT: 3306
MB_DB_DBNAME: circle_test
MB_DB_USER: root
MB_MYSQL_TEST_USER: root
services:
mariadb:
image: circleci/mariadb:10.2.23
ports:
- "3306:3306"
steps:
- uses: actions/checkout@v3
- name: Test MariaDB driver (10.2)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-mariadb-10-2-ee'
be-tests-mariadb-latest-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: mysql
MB_DB_TYPE: mysql
MB_DB_HOST: localhost
MB_DB_PORT: 3306
MB_DB_DBNAME: circle_test
MB_DB_USER: root
MB_MYSQL_TEST_USER: root
services:
mariadb:
image: circleci/mariadb:latest
ports:
- "3306:3306"
steps:
- uses: actions/checkout@v3
- name: Test MariaDB driver (latest)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-mariadb-latest-ee'
be-tests-mongo-4-0-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: mongo
MB_MONGO_TEST_USER: metabase
MB_MONGO_TEST_PASSWORD: metasample123
services:
mongodb:
image: metabase/qa-databases:mongo-sample-4.0
ports:
- "27017:27017"
steps:
- uses: actions/checkout@v3
- name: Test MongoDB driver (4.0)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-mongo-4-0-ee'
be-tests-mongo-5-0-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: mongo
MB_MONGO_TEST_USER: metabase
MB_MONGO_TEST_PASSWORD: metasample123
services:
mongodb:
image: metabase/qa-databases:mongo-sample-5.0
ports:
- "27017:27017"
steps:
- uses: actions/checkout@v3
- name: Test MongoDB driver (5.0)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-mongo-5-0-ee'
be-tests-mongo-latest-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: mongo
MB_MONGO_TEST_USER: metabase
MB_MONGO_TEST_PASSWORD: metasample123
services:
mongodb:
image: circleci/mongo:latest
ports:
- "27017:27017"
env:
MONGO_INITDB_ROOT_USERNAME: metabase
MONGO_INITDB_ROOT_PASSWORD: metasample123
steps:
- uses: actions/checkout@v3
- name: Test MongoDB driver (latest)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-mongo-latest-ee'
be-tests-mysql-5-7-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: mysql
MB_DB_TYPE: mysql
MB_DB_HOST: localhost
MB_DB_PORT: 3306
MB_DB_DBNAME: circle_test
MB_DB_USER: root
MB_MYSQL_TEST_USER: root
services:
mysql:
image: circleci/mysql:5.7.23
ports:
- "3306:3306"
steps:
- uses: actions/checkout@v3
- name: Test MySQL driver (5.7)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-mysql-5-7-ee'
be-tests-mysql-latest-ee:
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: mysql
MB_DB_TYPE: mysql
MB_DB_HOST: localhost
MB_DB_PORT: 3306
MB_DB_DBNAME: circle_test
MB_DB_USER: root
MB_MYSQL_TEST_USER: root
# set up env vars for something named "MYSQL_SSL" to run MySQL SSL tests verifying connectivity with PEM cert
# they are deliberately given a different name to prevent them from affecting the regular test run against
# the configured MySQL instance, but there is one particular test (mysql-connect-with-ssl-and-pem-cert-test)
# that overrides the MB_MYSQL_TEST_* values with them
# the MYSQL_RDS_SSL_INSTANCE vars are defined as secrets and can be altered
MB_MYSQL_SSL_TEST_HOST: ${{ secrets.MYSQL_RDS_SSL_INSTANCE_HOST }}
MB_MYSQL_SSL_TEST_SSL: true
MB_MYSQL_SSL_TEST_ADDITIONAL_OPTIONS: 'verifyServerCertificate=true'
# the contents of the ./resources/certificates/rds-combined-ca-bundle.pem file
MB_MYSQL_SSL_TEST_SSL_CERT: ${{ secrets.MB_MYSQL_SSL_TEST_SSL_CERT }}
MB_MYSQL_SSL_TEST_USER: metabase
MB_MYSQL_SSL_TEST_PASSWORD: ${{ secrets.MYSQL_RDS_SSL_INSTANCE_PASSWORD }}
services:
mysql:
image: circleci/mysql:latest
ports:
- "3306:3306"
steps:
- uses: actions/checkout@v3
- name: Test MySQL driver (latest)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-mysql-latest-ee'
be-tests-postgres-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: postgres
MB_DB_TYPE: postgres
MB_DB_PORT: 5432
MB_DB_HOST: localhost
MB_DB_DBNAME: circle_test
MB_DB_USER: circle_test
MB_POSTGRESQL_TEST_USER: circle_test
services:
postgres:
image: circleci/postgres:9.6-alpine
ports:
- "5432:5432"
env:
POSTGRES_USER: circle_test
POSTGRES_DB: circle_test
steps:
- uses: actions/checkout@v3
- name: Test Postgres driver (9.6)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-postgres-ee'
be-tests-postgres-latest-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: postgres
MB_DB_TYPE: postgres
MB_DB_PORT: 5432
MB_DB_HOST: localhost
MB_DB_DBNAME: circle_test
MB_DB_USER: circle_test
MB_POSTGRESQL_TEST_USER: circle_test
MB_POSTGRES_SSL_TEST_SSL: true
MB_POSTGRES_SSL_TEST_SSL_MODE: verify-full
MB_POSTGRES_SSL_TEST_SSL_ROOT_CERT_PATH: 'test-resources/certificates/us-east-2-bundle.pem'
services:
postgres:
image: circleci/postgres:latest
ports:
- "5432:5432"
env:
POSTGRES_USER: circle_test
POSTGRES_DB: circle_test
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- uses: actions/checkout@v3
- name: Test Postgres driver (latest)
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-postgres-latest-ee'
be-tests-presto-186-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: presto
services:
presto:
image: metabase/presto-mb-ci:0.186
ports:
- "8080:8080"
env:
JAVA_TOOL_OPTIONS: "-Xmx2g"
steps:
- uses: actions/checkout@v3
- name: Test Presto 0.186 driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-presto-186-ee'
be-tests-redshift-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: redshift
MB_REDSHIFT_TEST_USER: metabase_ci
MB_REDSHIFT_TEST_DB: testdb
MB_REDSHIFT_TEST_HOST: ${{ secrets.MB_REDSHIFT_TEST_HOST }}
MB_REDSHIFT_TEST_PASSWORD: ${{ secrets.MB_REDSHIFT_TEST_PASSWORD }}
steps:
- uses: actions/checkout@v3
- name: Test Redshift driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-redshift-ee'
be-tests-snowflake-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: snowflake
MB_SNOWFLAKE_TEST_USER: METABASE CI
MB_SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.MB_SNOWFLAKE_TEST_ACCOUNT }}
MB_SNOWFLAKE_TEST_PASSWORD: ${{ secrets.MB_SNOWFLAKE_TEST_PASSWORD }}
MB_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.MB_SNOWFLAKE_TEST_WAREHOUSE }}
MB_SNOWFLAKE_TEST_PK_USER: METABASE PK
MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v3
- name: Test Snowflake driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-snowflake-ee'
be-tests-sparksql-ee:
if: github.event.pull_request.draft == false
runs-on: buildjet-2vcpu-ubuntu-2004
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: sparksql
services:
sparksql:
image: metabase/spark:3.2.1
ports:
- "10000:10000"
steps:
- uses: actions/checkout@v3
- name: Test Spark driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-sparksql-ee'
be-tests-sqlite-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: sqlite
steps:
- uses: actions/checkout@v3
- name: Test SQLite driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-sqlite-ee'
be-tests-sqlserver-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: sqlserver
MB_SQLSERVER_TEST_HOST: localhost
MB_SQLSERVER_TEST_PASSWORD: 'P@ssw0rd'
MB_SQLSERVER_TEST_USER: SA
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2017-latest
ports:
- "1433:1433"
env:
ACCEPT_EULA: Y
SA_PASSWORD: 'P@ssw0rd'
MSSQL_MEMORY_LIMIT_MB: 1024
steps:
- uses: actions/checkout@v3
- name: Test MS SQL Server driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-sqlserver-ee'
be-tests-vertica-ee:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: vertica
services:
vertica:
image: sumitchawla/vertica
ports:
- "5433:5433"
steps:
- uses: actions/checkout@v3
- name: Make plugins directory
run: mkdir plugins
- name: Fetch JDBC driver
run: wget --output-document=plugins/vertica-jdbc-7.1.2-0.jar ${{ secrets.VERTICA_JDBC_JAR }}
- name: Test Vertica driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-vertica-ee'