-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (38 loc) · 1.22 KB
/
go.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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
- push
- pull_request
jobs:
build-linux:
name: Build on Linux
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Build for 386
run: GOOS=linux GOARCH=386 go build -v -x ./...
- name: Build for ARM
run: GOOS=linux GOARCH=arm go build -v -x ./...
- name: Build for ARM64
run: GOOS=linux GOARCH=arm64 go build -v -x ./...
- name: Build for AMD64
run: GOOS=linux GOARCH=amd64 go build -v -x ./...
- name: Build
run: go build -v ./...
- name: Build (Production Mode)
run: go build -v -tags slimcap_nomock ./...
- name: Test
run: |
go test -v ./... -covermode=atomic -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
- name: Test (Production Mode)
run: go test -v -tags slimcap_nomock ./...
- name: Race Detector
run: go test -race -v ./...