-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.25 KB
/
go.yml
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
name: SDK
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
go-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.22'
- name: OpenMLDB cluster
run: |
docker compose -f docker-compose.yml up -d
- name: verbose services
# ensure all services is up
run: |
sleep 60
docker compose --file docker-compose.yml ps -a
- name: init test database
run: |
docker compose -f docker-compose.yml exec openmldb-ns1 /opt/openmldb/bin/openmldb --zk_cluster=openmldb-zk:2181 --zk_root_path=/openmldb --role=sql_client --cmd 'CREATE DATABASE test_db'
docker compose -f docker-compose.yml exec openmldb-ns1 /opt/openmldb/bin/openmldb --zk_cluster=openmldb-zk:2181 --zk_root_path=/openmldb --role=sql_client --cmd 'SET GLOBAL execute_mode = "online"'
- name: go test
run: go test ./... -race -covermode=atomic -coverprofile=coverage.out -v
- name: Coverage
uses: codecov/codecov-action@v4
with:
files: coverage.out
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}