Convert "SHOW TABLES" to instead query information_schema.tables... #23
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
| name: Build Metabase arrow-flight-sql Driver | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone Metabase repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: metabase/metabase | |
| path: metabase | |
| - name: Checkout driver code | |
| uses: actions/checkout@v4 | |
| with: | |
| path: metabase/modules/drivers/arrow-flight-sql | |
| - name: List driver files for debugging | |
| run: | | |
| echo "Listing contents of metabase/modules/drivers/arrow-flight-sql:" | |
| ls -R metabase/modules/drivers/ | |
| ls -R metabase/modules/drivers/arrow-flight-sql | |
| - name: Register arrow-flight-sql in deps.edn | |
| working-directory: ./metabase | |
| run: | | |
| cp modules/drivers/arrow-flight-sql/ci/deps.edn modules/drivers/deps.edn | |
| echo "--- Verifying modules/drivers/deps.edn content ---" | |
| cat modules/drivers/deps.edn | |
| echo "----------------------------------------------------" | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install Yarn 1.x | |
| run: | | |
| npm install -g yarn@1 | |
| yarn --version | |
| - name: Set up Clojure | |
| uses: DeLaGuardo/setup-clojure@12.3 | |
| with: | |
| cli: latest | |
| - name: Build driver | |
| working-directory: ./metabase | |
| run: | | |
| chmod +x ./bin/build-driver.sh | |
| ./bin/build-driver.sh arrow-flight-sql | |
| - name: Upload driver artifact | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| with: | |
| name: metabase-arrow-flight-sql-driver | |
| path: metabase/resources/modules/arrow-flight-sql.metabase-driver.jar | |
| if-no-files-found: error | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| environment: | |
| name: release-approval | |
| url: https://github.com/${{ github.repository }}/releases/latest | |
| steps: | |
| - name: Checkout driver code | |
| uses: actions/checkout@v4 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: metabase-arrow-flight-sql-driver | |
| path: ./artifacts/ | |
| - name: Create release tag and upload artifact | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Fetch all tags | |
| git fetch --tags | |
| # Get the latest tag (assume semantic versioning) | |
| LATEST_TAG=$(git tag -l | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1) | |
| if [ -z "$LATEST_TAG" ]; then | |
| # No existing tags, start with 0.0.1 | |
| NEW_TAG="0.0.1" | |
| else | |
| # Extract version parts | |
| IFS='.' read -ra VERSION_PARTS <<< "$LATEST_TAG" | |
| MAJOR=${VERSION_PARTS[0]} | |
| MINOR=${VERSION_PARTS[1]} | |
| PATCH=${VERSION_PARTS[2]} | |
| # Increment patch version | |
| PATCH=$((PATCH + 1)) | |
| NEW_TAG="$MAJOR.$MINOR.$PATCH" | |
| fi | |
| # Configure git | |
| git config --global user.email "action@github.com" | |
| git config --global user.name "GitHub Action" | |
| # Create and push tag | |
| git tag $NEW_TAG | |
| git push origin $NEW_TAG | |
| echo "Created tag: $NEW_TAG (previous: $LATEST_TAG)" | |
| # Create GitHub Release | |
| gh release create $NEW_TAG \ | |
| --title "Release $NEW_TAG" \ | |
| --notes "Automated release $NEW_TAG" \ | |
| ./artifacts/arrow-flight-sql.metabase-driver.jar |