-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (121 loc) · 3.42 KB
/
pipeline.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Pipeline
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "Jenkinsfile"
jobs:
testing:
name: Short Tests with Race Detector
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
go: ["1.22.1"]
env:
OS: ${{ matrix.os }}
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Quick Test with Race Detector
run: go test -v -short -race -timeout 120s ./...
integration:
name: Run Integration Tests
runs-on: "ubuntu-latest"
services:
dind:
image: docker:23.0.6-dind-rootless
ports:
- 2375:2375
needs: [testing]
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.22.1"
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Integration Tests with Race Detector
run: make integration_test
full:
name: Run Full Test Suite
runs-on: ubuntu-latest
services:
dind:
image: docker:23.0.6-dind-rootless
ports:
- 2375:2375
needs: [testing, integration]
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.22.1"
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test short, long, extended, and concurrency validation
run: make full_test TIMEOUT=600s
rolling:
name: Rolling release
runs-on: ubuntu-latest
needs: [testing, integration]
permissions:
contents: write
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.22.1"
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build release binaries with WAL helper
run: make -j$(nproc) release wal=1
- name: Build compatability binaries
run: make -j$(nproc) compat
- name: Rolling release on main
uses: softprops/action-gh-release@v1
with:
name: "Automatic Build on main branch"
body: "This is a rolling release with the latest build artifacts on main branch. The release is updated every time commit(s) is pushed to main."
prerelease: true
tag_name: edge
files: bin/**