-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.42 KB
/
Copy pathci.yml
File metadata and controls
60 lines (57 loc) · 1.42 KB
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:
branches: [master]
jobs:
check:
name: lint + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
cache: true
- name: go mod tidy check
run: make tidy-check
- name: go vet (darwin/linux/windows)
run: |
go vet ./...
GOOS=windows GOARCH=amd64 go vet ./...
- name: tests
run: go test -race ./...
- name: golangci-lint
run: go tool golangci-lint run ./...
- name: govulncheck
run: go tool govulncheck ./...
build:
name: build ${{ matrix.goos }}/${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
cache: true
- name: build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: go build -o /tmp/NetMiddler-${{ matrix.goos }}-${{ matrix.goarch }} .