-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (35 loc) · 973 Bytes
/
build.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
name: Build
on:
[push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
only-new-issues: true
test:
runs-on: ubuntu-latest
env:
GORACE: history_size=4
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Test
run: |
go test -v -coverprofile=full_coverage -race -count=1 ./...
echo 'mode: atomic' > full.coverage
awk 'FNR>1' *_coverage >> full.coverage
- name: Install goveralls
if: success()
run: go mod vendor && go install ./vendor/github.com/mattn/goveralls
- name: Upload
if: success()
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=full.coverage -service=github