-
Notifications
You must be signed in to change notification settings - Fork 226
60 lines (56 loc) · 1.47 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
name: CI
on:
push:
branches:
- "master"
pull_request:
env:
GOLANGCILINT_VERSION: "1.60.3"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.23.0"
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v${{ env.GOLANGCILINT_VERSION }}
test:
strategy:
matrix:
include:
- os: ubuntu-latest
test_target: test-race
GOARCH: amd64
# race requires cgo, otherwise should not be needed
CGO_ENABLED: 1
# build and test on 32 bit, does not support race
- os: ubuntu-latest
test_target: test
GOARCH: "386"
CGO_ENABLED: 0
- os: macos-latest
test_target: test
GOARCH: amd64
CGO_ENABLED: 0
- os: windows-latest
test_target: test
GOARCH: amd64
CGO_ENABLED: 0
runs-on: ${{ matrix.os }}
steps:
# only run cli binary tests on linux
- name: Install expect
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install expect
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.23.0"
- name: Test
env:
CGO_ENABLED: ${{ matrix.CGO_ENABLED }}
GOARCH: ${{ matrix.GOARCH }}
run: make ${{ matrix.test_target }}