-
Notifications
You must be signed in to change notification settings - Fork 12
35 lines (33 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
name: Build and Test
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
name: Go CI
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18, 1.19]
steps:
- name: Set up Go
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a #v3.2.1
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1"
- name: Install protolint
run: go install github.com/yoheimuta/protolint/cmd/protolint@v0.42.2
- name: Build
run: go build ./...
- name: Test
run: |
./goclean.sh
- name: Upload logs if tests failed
if: failure()
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: ${{matrix.go}}-test-logs
path: /tmp/br*