-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (42 loc) · 1.09 KB
/
main.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
name: linter & tests
on: [push]
jobs:
linter:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- uses: actions/setup-go@v1
with:
go-version: '1.16.x'
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.41
- name: Install golint
run: go get -v golang.org/x/lint/golint
- name: Run golint
run: |
export PATH=$PATH:$(go env GOPATH)/bin
golint ./...
tests:
name: Tests
strategy:
matrix:
go-version: [1.14.x, 1.15.x,1.16.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Run tests
run: go test -v -covermode=atomic -coverprofile=coverage.out ./...
- name: Codecov.io
run: bash <(curl -s https://codecov.io/bash)