chore: (deps): Bump the actions group across 1 directory with 6 updates #183
This file contains hidden or 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
| # Copyright (c) 2025 ADBC Drivers Contributors | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Tests Workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/e2e-tests.yml' | |
| - 'ci/scripts/**' | |
| - 'csharp/src/**' | |
| - 'csharp/test/**' | |
| pull_request: | |
| # Only runs on PRs from the repo itself, not forks | |
| paths: | |
| - '.github/workflows/e2e-tests.yml' | |
| - 'ci/scripts/**' | |
| - 'csharp/src/**' | |
| - 'csharp/test/**' | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-all-tests: | |
| runs-on: ubuntu-latest | |
| environment: azure-prod | |
| env: | |
| DATABRICKS_SERVER_HOSTNAME: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_HTTP_PATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }} | |
| DATABRICKS_TEST_CLIENT_ID: ${{ secrets.DATABRICKS_TEST_CLIENT_ID }} | |
| DATABRICKS_TEST_CLIENT_SECRET: ${{ secrets.DATABRICKS_TEST_CLIENT_SECRET }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Generate OAuth access token | |
| id: oauth | |
| run: | | |
| OAUTH_RESPONSE=$(curl -s -X POST "https://${{ env.DATABRICKS_SERVER_HOSTNAME }}/oidc/v1/token" \ | |
| -H "Content-Type: application/x-www-form-urlencoded" \ | |
| -d "grant_type=client_credentials" \ | |
| -d "client_id=${{ env.DATABRICKS_TEST_CLIENT_ID }}" \ | |
| -d "client_secret=${{ env.DATABRICKS_TEST_CLIENT_SECRET }}" \ | |
| -d "scope=sql") | |
| OAUTH_TOKEN=$(echo "$OAUTH_RESPONSE" | python3 -c "import sys, json; print(json.load(sys.stdin)['access_token'])") | |
| if [ -z "$OAUTH_TOKEN" ]; then | |
| echo "ERROR: Failed to generate OAuth token" | |
| exit 1 | |
| fi | |
| echo "::add-mask::$OAUTH_TOKEN" | |
| echo "OAUTH_TOKEN=$OAUTH_TOKEN" >> $GITHUB_OUTPUT | |
| - name: Create Databricks config file | |
| run: | | |
| mkdir -p ~/.databricks | |
| cat > ~/.databricks/connection.json << EOF | |
| { | |
| "uri": "https://${{ env.DATABRICKS_SERVER_HOSTNAME }}${{ env.DATABRICKS_HTTP_PATH }}", | |
| "auth_type": "oauth", | |
| "grant_type": "client_credentials", | |
| "client_id": "${{ env.DATABRICKS_TEST_CLIENT_ID }}", | |
| "client_secret": "${{ env.DATABRICKS_TEST_CLIENT_SECRET }}", | |
| "scope": "sql", | |
| "access_token": "${{ steps.oauth.outputs.OAUTH_TOKEN }}", | |
| "type": "databricks", | |
| "catalog": "main", | |
| "db_schema": "adbc_testing", | |
| "query": "SELECT * FROM main.adbc_testing.adbc_testing_table", | |
| "expectedResults": 12, | |
| "isCITesting": true, | |
| "tracePropagationEnabled": "true", | |
| "traceParentHeaderName": "traceparent", | |
| "traceStateEnabled": "false", | |
| "metadata": { | |
| "catalog": "main", | |
| "schema": "adbc_testing", | |
| "table": "adbc_testing_table", | |
| "expectedColumnCount": 19 | |
| } | |
| } | |
| EOF | |
| echo "DATABRICKS_TEST_CONFIG_FILE=$HOME/.databricks/connection.json" >> $GITHUB_ENV | |
| - name: Build | |
| shell: bash | |
| run: | | |
| ./ci/scripts/csharp_build.sh "${{ github.workspace }}" | |
| - name: Run All Tests | |
| shell: bash | |
| run: | | |
| export DATABRICKS_TEST_CONFIG_FILE="$HOME/.databricks/connection.json" | |
| ./ci/scripts/csharp_test_databricks_e2e.sh "${{ github.workspace }}" |