-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (46 loc) · 1.2 KB
/
push.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
44
45
46
47
name: build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: lint linux
uses: docker://golangci/golangci-lint:v1.31.0
with:
args: golangci-lint run
env:
CGO_ENABLED: 0
- name: lint windows
uses: docker://golangci/golangci-lint:v1.31.0
with:
args: golangci-lint run
env:
GOOS: windows
CGO_ENABLED: 0
test_with_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.15
- name: Run Unit tests
run: go test -covermode atomic -coverprofile=profile.cov $(go list -m)/...
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
test:
strategy:
matrix:
go-version: [1.15]
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Run Unit tests
run: go test ./...