-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.23 KB
/
build.yaml
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: build
on:
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
env:
GO_VERSION: ^1.21
GOLANGCI_LINT_VERSION: v1.55.0
jobs:
go_install:
runs-on: ubuntu-latest
steps:
- uses: rlespinasse/[email protected]
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- run: cd /tmp && go install github.com/jjti/go-spancheck/cmd/spancheck@${{ env.version }} && spancheck -h
env:
version: ${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA || env.GITHUB_REF_SLUG }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- run: make testvendor
- run: go test -coverpkg=. -coverprofile=coverage.out ./...
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out