-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (113 loc) · 3.19 KB
/
water.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
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
name: "water"
on:
push:
branches: [ "master" ]
paths-ignore:
- '**.md'
- '**/LICENSE*'
pull_request:
branches: [ "master" ]
paths-ignore:
- '**.md'
- '**/LICENSE*'
env:
CGO_ENABLED: 0
jobs:
test_amd64_not-mac:
name: go${{ matrix.go }} (${{ matrix.os }}/amd64)
strategy:
matrix:
os: [ "ubuntu", "windows" ]
go: [ "1.21.x", "1.22.x" ] # we support the latest 2 stable versions of Go
runs-on: ${{ matrix.os }}-latest # use latest OS image
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Build and Test
run: |
go build -v ./...
go test -v ./...
test_not-amd64_linux:
name: go${{ matrix.go }} (linux/${{ matrix.arch }})
strategy:
matrix:
go: [ "1.21.x", "1.22.x" ] # we support the latest 2 stable versions of Go
arch: [ "arm64", "riscv64" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install QEMU
uses: docker/setup-qemu-action@v3
- name: Build and Test
run: |
GOARCH=${{ matrix.arch }} go build -v ./...
GOARCH=${{ matrix.arch }} go test -v ./...
test_amd64_mac:
name: go${{ matrix.go }} (macos/amd64)
strategy:
matrix:
go: [ "1.21.x", "1.22.x" ] # we support the latest 2 stable versions of Go
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Build and Test
run: |
go build -v ./...
go test -v ./...
test_arm64_mac:
name: go${{ matrix.go }} (macos/arm64)
strategy:
matrix:
go: [ "1.21.x", "1.22.x" ] # we support the latest 2 stable versions of Go
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Build and Test
run: |
go build -v ./...
go test -v ./...
go_test_race:
name: Go Race Detection
runs-on: "ubuntu-latest"
env:
CGO_ENABLED: 1 # go: -race requires cgo; enable cgo by setting CGO_ENABLED=1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.x"
- run: go version
- name: Go Test
run: go test -race ./...
golangci-lint:
name: lint
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.x"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.54
args: -v --disable structcheck,govet --timeout 5m