zeroshade commented on code in PR #356:
URL: https://github.com/apache/arrow-adbc/pull/356#discussion_r1081939925


##########
.github/workflows/native-unix.yml:
##########
@@ -178,28 +173,134 @@ jobs:
         shell: bash -l {0}
         run: |
           env BUILD_ALL=0 BUILD_DRIVER_SQLITE=1 ./ci/scripts/cpp_test.sh 
"$(pwd)" "$(pwd)/build"
+      - name: BuildPostgreSQL Driver
+        shell: bash -l {0}
+        run: |
+          env BUILD_ALL=0 BUILD_DRIVER_POSTGRESQL=1 ./ci/scripts/cpp_build.sh 
"$(pwd)" "$(pwd)/build"
+      - name: Build Driver Manager
+        shell: bash -l {0}
+        run: |
+          env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 ./ci/scripts/cpp_build.sh 
"$(pwd)" "$(pwd)/build"
+      - name: Test Driver Manager
+        shell: bash -l {0}
+        run: |
+          env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 ./ci/scripts/cpp_build.sh 
"$(pwd)" "$(pwd)/build"
+          env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 ./ci/scripts/cpp_test.sh 
"$(pwd)" "$(pwd)/build"
+
+  # ------------------------------------------------------------
+  # C/C++ driver service integration tests
+  # ------------------------------------------------------------
+  drivers-integration-conda:
+    name: "C/C++ (Conda) Driver Service Integration Tests"
+    runs-on: ubuntu-latest
+    services:
+      postgres:
+        image: postgres
+        env:
+          POSTGRES_DB: tempdb
+          POSTGRES_PASSWORD: password
+        options: >-
+          --health-cmd pg_isready
+          --health-interval 10s
+          --health-timeout 5s
+          --health-retries 5
+        ports:
+          - 5432:5432
+      dremio:
+        image: dremio/dremio-oss:latest
+        env:
+          DREMIO_JAVA_EXTRA_OPTS: "-Ddebug.addDefaultUser=true 
-Ddremio.eula.disabled=true"
+        options: >-
+          --health-cmd "curl --fail http://localhost:9047/ || exit 1"
+          --health-interval 10s
+          --health-timeout 5s
+          --health-retries 5
+        ports:
+          - 9047:9047
+          - 32010:32010
+          - 31010:31010
+          - 45678:45678
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          persist-credentials: false
+      - name: Get Date
+        id: get-date
+        shell: bash
+        run: |
+          echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
+      - name: Cache Conda
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/conda_pkgs_dir
+          key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ 
env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
+      - uses: conda-incubator/setup-miniconda@v2
+        with:
+          miniforge-variant: Mambaforge
+          miniforge-version: latest
+          use-only-tar-bz2: false
+          use-mamba: true
+      - name: Install Dependencies
+        shell: bash -l {0}
+        run: |
+          mamba install -c conda-forge \
+            --file ci/conda_env_cpp.txt
+      - uses: actions/setup-go@v3
+        with:
+          go-version: 1.18.6
+          check-latest: true
+          cache: true
+          cache-dependency-path: go/adbc/go.sum
       - name: Build PostgreSQL Driver
         shell: bash -l {0}
         run: |
           env BUILD_ALL=0 BUILD_DRIVER_POSTGRESQL=1 ./ci/scripts/cpp_build.sh 
"$(pwd)" "$(pwd)/build"
       - name: Test PostgreSQL Driver
         shell: bash -l {0}
-        if: matrix.os == 'ubuntu-latest'
         env:
           BUILD_ALL: "0"
           BUILD_DRIVER_POSTGRESQL: "1"
           ADBC_POSTGRESQL_TEST_URI: 
"postgres://localhost:5432/postgres?user=postgres&password=password"
         run: |
           ./ci/scripts/cpp_test.sh "$(pwd)" "$(pwd)/build"
-      - name: Build Driver Manager
+      - name: Login To Dremio
         shell: bash -l {0}
+        id: bootstrap
         run: |
-          env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 ./ci/scripts/cpp_build.sh 
"$(pwd)" "$(pwd)/build"
-      - name: Test Driver Manager
+          LOGIN=`curl -X POST -H "Content-Type: application/json" 
"http://localhost:9047/apiv2/login"; \
+            -d '{"userName":"dremio","password":"dremio123"}'`
+          echo "login_resp=$LOGIN" >> $GITHUB_OUTPUT
+      - name: Auth Token
         shell: bash -l {0}
+        id: auth
         run: |
-          env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 ./ci/scripts/cpp_build.sh 
"$(pwd)" "$(pwd)/build"
-          env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 ./ci/scripts/cpp_test.sh 
"$(pwd)" "$(pwd)/build"
+          echo "token=_dremio${{ 
fromJSON(steps.bootstrap.outputs.login_resp).token }}" >> $GITHUB_OUTPUT
+      - name: Add Samples Catalog
+        shell: bash -l {0}
+        run: |
+          curl -X PUT -H "content-type: application/json" -H "authorization: 
${{ steps.auth.outputs.token }}" \
+            "http://localhost:9047/apiv2/source/Samples/"; -d 
'{"config":{"externalBucketList":["samples.dremio.com"],
+            
"credentialType":"NONE","secure":false,"propertyList":[]},"name":"Samples","accelerationRefreshPeriod":3600000,
+            
"accelerationGracePeriod":10800000,"accelerationNeverRefresh":true,"accelerationNeverExpire":true,"type":"S3"}'

Review Comment:
   Well I could add the postgresql that we spun up as a source lol, that'd work



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to