-
Notifications
You must be signed in to change notification settings - Fork 248
88 lines (81 loc) · 2 KB
/
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
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
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
go-version:
- 1.20.x
- 1.19.x
os:
- macos
- ubuntu
- windows
name: build (${{ matrix.os }}/go-${{ matrix.go-version }})
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- run: make build
test:
strategy:
matrix:
go-version:
- 1.20.x
- 1.19.x
os:
- macos
- ubuntu
- windows
name: test (${{ matrix.os }}/go-${{ matrix.go-version }})
runs-on: ${{ matrix.os }}-latest
services:
minio:
image: ${{ (matrix.os == 'ubuntu') && 'bitnami/minio:2023.7.18' || ''}}
ports:
- 45677:9000
options: >-
--health-cmd "curl -I http://localhost:9000/minio/health/live -s"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- run: make test
env:
S5CMD_TEST_ENDPOINT_URL: ${{ (matrix.os == 'ubuntu') && 'http://localhost:45677' || '' }}
qa:
strategy:
matrix:
go-version:
- 1.20.x
os:
- ubuntu
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- run: make check-fmt
- run: go install github.com/golang/mock/mockgen@v1.6.0
- run: make check-codegen
- run: make vet
- run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.3
- run: make staticcheck
- run: go install mvdan.cc/unparam@latest
- run: make unparam