-
Notifications
You must be signed in to change notification settings - Fork 48
71 lines (59 loc) · 1.75 KB
/
continuous-integration.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Lint and test
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x]
platform: [macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@v2
- name: Fetch dependencies
run: |
go get -v -t -d ./...
- name: Install linters
run: |
go get golang.org/x/lint/golint
go install golang.org/x/lint/golint
# later versions only run on Go 1.15.x and above
go get github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/golangci/golangci-lint/cmd/golangci-lint
- name: Lint Go source code
run: zsh run-tests.sh -vl
- name: Install test dependencies
run: go get github.com/mfridman/tparse
- name: Run unit tests
run: zsh run-tests.sh -ic ./...
- name: Codecov
uses: codecov/codecov-action@v1
with:
file: coverage.out
# - name: Codacy
# run: |
# go install github.com/schrej/godacov
# godacov -r coverage.out -t "${{ secrets.CODACY_TOKEN }}" -c "${{ github.sha }}"
- name: Coveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
flag-name: Go-${{ matrix.go-version }}
parallel: true
finish:
name: Coveralls upload
needs: test
runs-on: macos-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true