From 4fbc4765c026fcca466beefb949a9254f03060ed Mon Sep 17 00:00:00 2001
From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Date: Mon, 12 Dec 2022 15:58:00 +0100
Subject: [PATCH] Migrate Athena, GA and Redshift drivers tests to GitHub
 Actions (#27151)

* Migrate Google Analytics driver test to GitHub Actions

* Migrate Redshift driver test to GitHub Actions

* Migrate Athena driver test to GitHub Actions
---
 .circleci/config.yml          |  2 +-
 .github/workflows/drivers.yml | 50 +++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index c32360340ff..fb782e05a53 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -558,7 +558,7 @@ workflows:
       - test-driver:
           matrix:
             parameters:
-              driver: ["bigquery-cloud-sdk", "googleanalytics", "redshift", "athena"]
+              driver: ["bigquery-cloud-sdk"]
           name: be-tests-<< matrix.driver >>-ee
           requires:
             - be-deps
diff --git a/.github/workflows/drivers.yml b/.github/workflows/drivers.yml
index 424cb371f3f..d894986d8dd 100644
--- a/.github/workflows/drivers.yml
+++ b/.github/workflows/drivers.yml
@@ -22,6 +22,24 @@ on:
 
 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-druid-ee:
     if: github.event.pull_request.draft == false
     runs-on: buildjet-2vcpu-ubuntu-2004
@@ -43,6 +61,20 @@ jobs:
       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-mariadb-10-2-ee:
     if: github.event.pull_request.draft == false
     runs-on: ubuntu-20.04
@@ -301,6 +333,24 @@ jobs:
       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-sparksql-ee:
     if: github.event.pull_request.draft == false
     runs-on: buildjet-2vcpu-ubuntu-2004
-- 
GitLab