forked from lance-format/lance-namespace-impls
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (89 loc) · 3.06 KB
/
integration-hive2.yml
File metadata and controls
101 lines (89 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Hive2 Integration Tests
on:
push:
branches: [main]
paths:
- 'java/lance-namespace-hive2/**'
- 'docker/hive2/**'
- 'docker/docker-compose.yml'
- '.github/workflows/integration-hive2.yml'
pull_request:
branches: [main]
paths:
- 'java/lance-namespace-hive2/**'
- 'docker/hive2/**'
- 'docker/docker-compose.yml'
- '.github/workflows/integration-hive2.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
integration-test:
runs-on: ubuntu-latest
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: |
mkdir -p docker/hive2
curl -sSL -o docker/hive2/postgresql-42.7.3.jar \
https://jdbc.postgresql.org/download/postgresql-42.7.3.jar
- name: Start Hive2 Metastore
run: |
docker compose -f docker/hive2/docker-compose.yml up -d
echo "Waiting for services to start..."
- name: Wait for Hive2 Metastore to be ready
run: |
echo "Waiting for Hive2 Metastore to be ready..."
timeout 180 bash -c '
until docker compose -f docker/hive2/docker-compose.yml ps | grep -q "healthy"; do
echo "Waiting for healthy status..."
docker compose -f docker/hive2/docker-compose.yml ps
sleep 10
done
' || {
echo "Timeout waiting for Hive2 Metastore"
docker compose -f docker/hive2/docker-compose.yml logs
exit 1
}
echo "Hive2 Metastore is ready"
- name: Verify Hive2 connectivity
run: |
# Wait a bit more for thrift to be fully ready
sleep 10
nc -z localhost 9083 || {
echo "Cannot connect to Hive2 Metastore on port 9083"
docker compose -f docker/hive2/docker-compose.yml logs
exit 1
}
echo "Hive2 Metastore is accepting connections on port 9083"
- name: Run Hive2 integration tests
working-directory: java
run: |
./mvnw test -pl lance-namespace-hive2 \
-Dtest="*IntegrationTest" \
-DfailIfNoTests=false \
-Dmaven.test.failure.ignore=false
- name: Collect logs on failure
if: failure()
run: |
echo "=== Docker Compose Status ==="
docker compose -f docker/hive2/docker-compose.yml ps
echo ""
echo "=== Hive2 Metastore Logs ==="
docker compose -f docker/hive2/docker-compose.yml logs hive2-metastore
echo ""
echo "=== PostgreSQL Logs ==="
docker compose -f docker/hive2/docker-compose.yml logs postgres-hive2
- name: Cleanup
if: always()
run: |
docker compose -f docker/hive2/docker-compose.yml down -v