-
Notifications
You must be signed in to change notification settings - Fork 51
101 lines (82 loc) · 2.12 KB
/
build.yaml
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: Build, test, format and lint
on:
push:
pull_request:
jobs:
build-binaries:
runs-on: ubuntu-latest
name: Build binary for ${{ matrix.platform.name }}
strategy:
matrix:
platform:
- name: linux on amd64
task: build-linux-amd64
- name: linux on arm64
task: build-linux-arm64
- name: osx on amd64
task: build-darwin-amd64
- name: osx on arm64
task: build-darwin-arm64
steps:
- uses: actions/[email protected]
with:
submodules: true
- uses: actions/setup-go@v2
with:
go-version: ^1.19
- name: Build binaries
run: make ${{ matrix.platform.task }}
format-lint:
runs-on: ubuntu-latest
name: Format and lint
steps:
- uses: actions/[email protected]
with:
submodules: true
- uses: actions/setup-go@v2
with:
go-version: ^1.19
- name: Install tools
run: make install-tools
- name: Format
run: make fmt && git diff --quiet
- name: Lint
run: make lint
e2e-test:
runs-on: ubuntu-latest
name: E2E Test
steps:
- uses: actions/[email protected]
with:
submodules: true
- uses: actions/setup-go@v2
with:
go-version: ^1.19
- name: Run e2e test
run: make e2e-tests
unit-tests:
runs-on: ubuntu-latest
name: Unit tests
steps:
- uses: actions/[email protected]
with:
submodules: true
- uses: actions/setup-go@v2
with:
go-version: ^1.19
- name: Run unit test
run: make test
integration-tests:
runs-on: ubuntu-latest
name: Integration tests
steps:
- uses: actions/[email protected]
with:
submodules: true
- uses: actions/setup-go@v2
with:
go-version: ^1.19
- name: Setup database
run: docker run --rm -d -p9000:9000 --name test-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server:22
- name: Run integration tests
run: make integration-test