-
Notifications
You must be signed in to change notification settings - Fork 25
49 lines (42 loc) · 957 Bytes
/
test.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
name: Test
on:
push:
branches:
- '**'
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Build
run: |
export GOAMD64=v3
go build -v -trimpath -ldflags '-s -w' ./cmd/swgp-go
- name: Test
run: go test -v -benchmem -bench . ./...
- name: Upload Binaries
uses: actions/upload-artifact@v3
with:
name: swgp-go-${{ github.sha }}-${{ matrix.os }}-x86-64-v3
path: swgp-go*