-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1013 Bytes
/
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
name: Go
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.20
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: go build -v .
# Running tests with and without the race checker, as certain tests are
# only run when the race checker is not enabled
- name: Test
run: go test -v -coverprofile=profile.cov ./...
- name: Coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
- name: Test (race)
run: go test -race -v ./...
- name: Install Linter
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.53.2
- name: Lint
run: ./bin/golangci-lint run .