-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (76 loc) · 2.72 KB
/
Copy pathe2e-1c1d.yml
File metadata and controls
90 lines (76 loc) · 2.72 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
name: E2E Tests (1C1D)
on:
push:
branches: [ develop, dev/* ]
pull_request:
branches: [ develop ]
jobs:
e2e-1c1d:
name: E2E 1C1D (iotdb ${{ matrix.iotdb-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
iotdb-version: ["2.0.6", "2.0.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Create test results directory
run: mkdir -p test-results
- name: Start IoTDB with Docker Compose
env:
IOTDB_VERSION: ${{ matrix.iotdb-version }}
run: |
docker compose -f docker-compose-1c1d.yml up -d
echo "Waiting for IoTDB to be ready..."
sleep 5
- name: Verify IoTDB ports are listening
run: |
echo "Checking IoTDB port 6667..."
ss -tuln | grep 6667 || (echo "ERROR: Port 6667 is not listening!" && exit 1)
echo "Port 6667 is listening ✓"
- name: Show Docker container status
continue-on-error: true
run: |
echo "=== Docker containers status ==="
docker compose -f docker-compose-1c1d.yml ps
echo ""
echo "=== Recent logs from iotdb-datanode ==="
docker compose -f docker-compose-1c1d.yml logs --tail=50 iotdb-datanode
- name: Run E2E Tests
env:
IOTDB_HOST: localhost
IOTDB_PORT: 6667
IOTDB_USER: root
IOTDB_PASSWORD: root
run: |
set -o pipefail
npm run test:e2e 2>&1 | tee test-results/test-output.log
- name: Collect Docker logs on failure
if: failure()
run: |
echo "=== Collecting Docker logs ==="
mkdir -p test-results/docker-logs
docker compose -f docker-compose-1c1d.yml logs > test-results/docker-logs/all-containers.log
docker compose -f docker-compose-1c1d.yml logs iotdb-confignode > test-results/docker-logs/confignode.log
docker compose -f docker-compose-1c1d.yml logs iotdb-datanode > test-results/docker-logs/datanode.log
echo "Docker logs saved to test-results/docker-logs/"
- name: Stop and clean up Docker Compose
if: always()
run: |
docker compose -f docker-compose-1c1d.yml down -v
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-test-results-1c1d-iotdb-${{ matrix.iotdb-version }}
path: test-results/