|
5 | 5 |
|
6 | 6 | jobs: |
7 | 7 | test: |
8 | | - name: Test on ${{ matrix.os }} with Go ${{ matrix.go_version }} |
| 8 | + name: With ${{ matrix.go_version }} |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | strategy: |
11 | 11 | matrix: |
12 | 12 | go_version: [1.15] |
13 | | - os: [ubuntu-latest, windows-latest, macOS-latest] |
14 | 13 | steps: |
15 | 14 | - name: Set up Go ${{ matrix.go_version }} |
16 | 15 | uses: actions/setup-go@v1 |
17 | 16 | with: |
18 | 17 | go-version: ${{ matrix.go_version }} |
19 | 18 | id: go |
20 | | - |
21 | 19 | - name: Check out code |
22 | 20 | uses: actions/checkout@v1 |
| 21 | + - name: Go Test |
| 22 | + run: | |
| 23 | + go test -timeout 5m -race -v -covermode=atomic -coverprofile=coverage.out ./... |
| 24 | + - name: Send coverage to Coveralls |
| 25 | + env: |
| 26 | + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 27 | + run: | |
| 28 | + GO111MODULE=off go get -u github.com/mattn/goveralls |
| 29 | + $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github |
23 | 30 |
|
24 | | - - name: Staticcheck |
| 31 | + staticcheck: |
| 32 | + name: StaticCheck |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@master |
| 36 | + - name: check |
25 | 37 | uses: grandcolline/[email protected] |
26 | 38 | with: |
27 | 39 | run: staticcheck |
28 | 40 | token: ${{ secrets.GITHUB_TOKEN }} |
29 | 41 |
|
30 | | - - name: Go vet with shadow |
| 42 | + vet-shadow: |
| 43 | + name: Go Vet with Shadow |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@master |
| 47 | + - name: check |
31 | 48 | uses: grandcolline/[email protected] |
32 | 49 | with: |
33 | 50 | run: shadow |
34 | 51 | token: ${{ secrets.GITHUB_TOKEN }} |
35 | 52 |
|
36 | | - - name: Go Test |
37 | | - run: | |
38 | | - go test -timeout 5m -race -v -covermode=atomic -coverprofile=coverage.out ./... |
39 | | - - name: Send coverage to Coveralls |
40 | | - env: |
41 | | - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
42 | | - run: | |
43 | | - GO111MODULE=off go get -u github.com/mattn/goveralls |
44 | | - $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github |
|
0 commit comments