-
Notifications
You must be signed in to change notification settings - Fork 53
39 lines (35 loc) · 929 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
name: build-and-test
on:
push:
branches:
- main
pull_request:
jobs:
test-main-package:
runs-on: ubuntu-20.04
strategy:
matrix:
GO_VERSION: [ "1.17", "1.20" ]
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.GO_VERSION }}
- name: Caching dependency
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
- name: Run signalfx-go tests
run: |
go mod download
# Used for code generation
go install github.com/mauricelam/genny
go install golang.org/x/tools/cmd/goimports
go generate ./...
go test ./... -parallel 4 -timeout 4m