Skip to content

Commit c368fdc

Browse files
authored
separate jobs for all static checks (#1)
1 parent 8bbe4ce commit c368fdc

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55

66
jobs:
77
build:
8-
name: Test on ${{ matrix.os }} with Go ${{ matrix.go_version }}
8+
name: On ${{ matrix.os }} with Go ${{ matrix.go_version }}
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
@@ -17,15 +17,11 @@ jobs:
1717
with:
1818
go-version: ${{ matrix.go_version }}
1919
id: go
20-
2120
- name: Check out code
2221
uses: actions/checkout@v1
23-
2422
- name: Go mod verify
2523
run: go mod verify
26-
2724
- name: Go vet normally
2825
run: go vet ./...
29-
3026
- name: Go build
3127
run: go build ./...

.github/workflows/test.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,48 @@ env:
55

66
jobs:
77
test:
8-
name: Test on ${{ matrix.os }} with Go ${{ matrix.go_version }}
8+
name: With ${{ matrix.go_version }}
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
1212
go_version: [1.15]
13-
os: [ubuntu-latest, windows-latest, macOS-latest]
1413
steps:
1514
- name: Set up Go ${{ matrix.go_version }}
1615
uses: actions/setup-go@v1
1716
with:
1817
go-version: ${{ matrix.go_version }}
1918
id: go
20-
2119
- name: Check out code
2220
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
2330
24-
- name: Staticcheck
31+
staticcheck:
32+
name: StaticCheck
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@master
36+
- name: check
2537
uses: grandcolline/[email protected]
2638
with:
2739
run: staticcheck
2840
token: ${{ secrets.GITHUB_TOKEN }}
2941

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
3148
uses: grandcolline/[email protected]
3249
with:
3350
run: shadow
3451
token: ${{ secrets.GITHUB_TOKEN }}
3552

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

Comments
 (0)