-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (33 loc) · 749 Bytes
/
main.yml
File metadata and controls
39 lines (33 loc) · 749 Bytes
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
name: Lint & Test
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.17.3'
- name: Setup Go environment
run: |
go mod download
go get -t .
- name: Linting
uses: golangci/golangci-lint-action@v2
with:
version: latest
skip-go-installation: true
- name: Unit tests
run: |
go test ./... -coverprofile coverage.out -covermode atomic
go tool cover -func coverage.out