-
Notifications
You must be signed in to change notification settings - Fork 122
42 lines (38 loc) · 1.03 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
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
go-version: [1.20.x, 1.19.x, 1.18.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Build on ${{ matrix.os }}
if: matrix.os == 'windows-latest'
run: go test -race -v ./...
- name: Build on ${{ matrix.os }}
if: matrix.os == 'macos-latest'
run: go test -race -v ./...
- name: Build on ${{ matrix.os }}
if: matrix.os == 'ubuntu-latest'
run: |
diff -au <(gofmt -d .) <(printf "")
go test -race -v ./...
go vet -asmdecl .
./test-architectures.sh