-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (44 loc) · 1.06 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
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
go-version: [1.15.x, 1.18.x, 1.20.x, 1.23.x]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os}}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Fetch Repository
uses: actions/checkout@v2
- name: Make Ready
run: |
go version
go env
go get -t -v ./...
git rev-parse --short HEAD
- name: Run Vet
run: go vet ./...
- name: Run Test
run: go test -v -cover -covermode=atomic ./...
bench:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ^1.23
- name: Fetch Repository
uses: actions/checkout@v2
- name: Run Benchmark
run: go test -run=^$ -benchmem -benchtime=1s -bench=.