File tree Expand file tree Collapse file tree 3 files changed +28
-22
lines changed Expand file tree Collapse file tree 3 files changed +28
-22
lines changed Original file line number Diff line number Diff line change 17
17
jobs :
18
18
integration-tests :
19
19
runs-on : ubuntu-latest
20
-
21
- services :
22
- greptimedb :
23
- image : greptime/greptimedb:latest
24
- ports :
25
- - 4001:4001 # gRPC
26
- - 4000:4000 # HTTP
27
- options : >-
28
- --health-cmd "curl -f http://localhost:4000/health"
29
- --health-interval 10s
30
- --health-timeout 5s
31
- --health-retries 10
32
- --health-start-period 30s
33
- env :
34
- GREPTIMEDB_LOG_LEVEL : info
35
20
36
21
steps :
37
22
- name : Checkout repository
@@ -47,10 +32,11 @@ jobs:
47
32
with :
48
33
key : integration-tests
49
34
50
- - name : Wait for GreptimeDB to be ready
35
+ - name : Install Protocol Buffers compiler
51
36
run : |
52
- timeout 60 bash -c 'until curl -f http://localhost:4000/health; do sleep 1; done'
53
- echo "GreptimeDB is ready!"
37
+ sudo apt-get update
38
+ sudo apt-get install -y protobuf-compiler
39
+ protoc --version
54
40
55
41
- name : Run format check
56
42
run : cargo fmt --all -- --check
@@ -64,11 +50,17 @@ jobs:
64
50
- name : Run unit tests
65
51
run : cargo test --lib
66
52
53
+ - name : Start GreptimeDB with Docker Compose
54
+ run : |
55
+ docker compose -f docker-compose.test.yml up -d
56
+ timeout 60 bash -c 'until curl -f http://localhost:4000/health; do sleep 1; done'
57
+ echo "GreptimeDB is ready!"
58
+
67
59
- name : Run integration tests
68
60
run : cargo test --test integration --features integration-tests --verbose
69
61
env :
70
62
RUST_LOG : info
71
63
72
- - name : Run integration tests with custom script
73
- run : ./scripts/run_integration_tests.sh
74
- if : success ()
64
+ - name : Cleanup
65
+ run : docker compose -f docker-compose.test.yml down -v
66
+ if : always ()
Original file line number Diff line number Diff line change @@ -129,4 +129,4 @@ case "$1" in
129
129
* )
130
130
main " $@ "
131
131
;;
132
- esac
132
+ esac
Original file line number Diff line number Diff line change
1
+ // Copyright 2023 Greptime Team
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
// Integration tests for GreptimeDB Rust Ingester
2
16
// These tests require a running GreptimeDB instance
3
17
You can’t perform that action at this time.
0 commit comments