feat: make things work #2
Workflow file for this run
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
| # 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: Java Hive3 Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - java/lance-namespace-hive3/** | |
| - docker/hive3/** | |
| - .github/workflows/java-integ-hive3.yml | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - ready_for_review | |
| - reopened | |
| paths: | |
| - java/lance-namespace-hive3/** | |
| - docker/hive3/** | |
| - .github/workflows/java-integ-hive3.yml | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| integration-test: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: "17" | |
| distribution: "temurin" | |
| cache: "maven" | |
| - name: Download PostgreSQL JDBC driver | |
| run: make docker-setup | |
| - name: Start Hive3 Metastore | |
| run: make docker-up-hive3 | |
| - name: Wait for Hive3 Metastore to be ready | |
| run: | | |
| echo "Waiting for Hive3 Metastore to be ready..." | |
| timeout 180 bash -c ' | |
| until docker compose -f docker/hive3/docker-compose.yml ps | grep -q "healthy"; do | |
| echo "Waiting for healthy status..." | |
| docker compose -f docker/hive3/docker-compose.yml ps | |
| sleep 10 | |
| done | |
| ' || { | |
| echo "Timeout waiting for Hive3 Metastore" | |
| docker compose -f docker/hive3/docker-compose.yml logs | |
| exit 1 | |
| } | |
| sleep 10 | |
| nc -z localhost 9084 || { | |
| echo "Cannot connect to Hive3 Metastore on port 9084" | |
| docker compose -f docker/hive3/docker-compose.yml logs | |
| exit 1 | |
| } | |
| echo "Hive3 Metastore is ready" | |
| - name: Build | |
| run: make build-java | |
| - name: Run integration tests | |
| run: make java-integ-test-hive3 | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Docker Compose Status ===" | |
| docker compose -f docker/hive3/docker-compose.yml ps | |
| echo "" | |
| echo "=== Hive3 Metastore Logs ===" | |
| docker compose -f docker/hive3/docker-compose.yml logs hive3-metastore | |
| echo "" | |
| echo "=== PostgreSQL Logs ===" | |
| docker compose -f docker/hive3/docker-compose.yml logs postgres-hive3 | |
| - name: Cleanup | |
| if: always() | |
| run: make docker-down-hive3 |