|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: E2E Tests |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: |
| 23 | + - main |
| 24 | + paths: |
| 25 | + - '.github/workflows/e2e-tests.yml' |
| 26 | + - 'csharp/src/**' |
| 27 | + - 'csharp/test/**' |
| 28 | + pull_request: |
| 29 | + # Only runs on PRs from the repo itself, not forks |
| 30 | + paths: |
| 31 | + - '.github/workflows/e2e-tests.yml' |
| 32 | + - 'csharp/src/**' |
| 33 | + - 'csharp/test/**' |
| 34 | + |
| 35 | +concurrency: |
| 36 | + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} |
| 37 | + cancel-in-progress: true |
| 38 | + |
| 39 | +jobs: |
| 40 | + run-e2e-tests: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + timeout-minutes: 15 |
| 43 | + env: |
| 44 | + DATABRICKS_SERVER_HOSTNAME: ${{ secrets.DATABRICKS_HOST }} |
| 45 | + DATABRICKS_HTTP_PATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }} |
| 46 | + DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} |
| 47 | + DATABRICKS_CATALOG: peco |
| 48 | + DATABRICKS_USER: ${{ secrets.TEST_PECO_SP_ID }} |
| 49 | + steps: |
| 50 | + - name: Checkout repository |
| 51 | + uses: actions/checkout@v4 |
| 52 | + with: |
| 53 | + submodules: recursive |
| 54 | + |
| 55 | + - name: Set up .NET |
| 56 | + uses: actions/setup-dotnet@v4 |
| 57 | + with: |
| 58 | + dotnet-version: '8.0.x' |
| 59 | + |
| 60 | + - name: Create Databricks config file |
| 61 | + run: | |
| 62 | + mkdir -p ~/.databricks |
| 63 | + cat > ~/.databricks/connection.json << EOF |
| 64 | + { |
| 65 | + "uri": "https://${{ env.DATABRICKS_SERVER_HOSTNAME }}${{ env.DATABRICKS_HTTP_PATH }}", |
| 66 | + "adbc.spark.auth_type": "token", |
| 67 | + "adbc.spark.access_token": "${{ env.DATABRICKS_TOKEN }}", |
| 68 | + "adbc.connection.catalog": "${{ env.DATABRICKS_CATALOG }}", |
| 69 | + "adbc.connection.db_schema": "default", |
| 70 | + "adbc.drivers.databricks.enable_multiple_catalog_support": "true", |
| 71 | + "adbc.drivers.databricks.enable_direct_results": "true" |
| 72 | + } |
| 73 | + EOF |
| 74 | + echo "DATABRICKS_TEST_CONFIG_FILE=$HOME/.databricks/connection.json" >> $GITHUB_ENV |
| 75 | +
|
| 76 | + - name: Build |
| 77 | + shell: bash |
| 78 | + run: | |
| 79 | + ./ci/scripts/csharp_build.sh "${{ github.workspace }}" |
| 80 | +
|
| 81 | + - name: Test Databricks E2E |
| 82 | + shell: bash |
| 83 | + run: | |
| 84 | + ./ci/scripts/csharp_test_databricks_e2e.sh "${{ github.workspace }}" |
0 commit comments