forked from ava-labs/avalanche-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.07 KB
/
lint-and-tests.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: Lint + Unit Tests
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.29
working-directory: .
args: --timeout 3m
- name: Install license check
run: go install github.com/google/[email protected]
- name: Check license
run: addlicense -f ./LICENSE.header -check -v ./**/*.go
test:
name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.17"]
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: go mod download
- run: scripts/build.sh
- run: go test -v -coverprofile=coverage.out ./...
- run: go tool cover -func=coverage.out