-
Notifications
You must be signed in to change notification settings - Fork 4.9k
43 lines (35 loc) · 1015 Bytes
/
taoskeeper-ci.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
name: taoskeeper CI
on:
push:
paths:
- tools/keeper/**
jobs:
build:
runs-on: ubuntu-latest
name: Run unit tests
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Start TDengine
run: |
docker pull tdengine/tdengine:latest
docker run --name tdengine -d -p 6030:6030 -p 6041:6041 -p 6043-6060:6043-6060 -p 6043-6060:6043-6060/udp tdengine/tdengine
- name: Build taoskeeper
working-directory: tools/keeper
run: |
go mod tidy
go build -v ./...
- name: Run tests with coverage
working-directory: tools/keeper
run: |
sudo go test -v -coverpkg=./... -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
- name: Clean up
if: always()
run: |
docker stop tdengine
docker rm tdengine