Skip to content

Commit 8ff092f

Browse files
committed
Update golang workflow
1 parent 096aab0 commit 8ff092f

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/test.yml

+16-7
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,27 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/setup-go@master
15-
with:
16-
go-version: "1.16"
17-
- uses: actions/checkout@master
14+
- name: Checkout
15+
uses: actions/checkout@master
1816
with:
1917
fetch-depth: 1
20-
- run: make test
18+
- name: Detect go version
19+
id: go-version
20+
run: echo "::set-output name=VERSION::$(cat .go-version)"
21+
- name: Setup go
22+
uses: actions/setup-go@master
23+
with:
24+
stable: 'false'
25+
go-version: ${{ steps.go-version.outputs.VERSION }}
26+
- name: Run test
27+
run: make test
2128
env:
2229
GOARGS: "-v -race"
2330
GOMAXPROCS: 8
24-
- uses: codecov/codecov-action@v1
31+
- name: Report coverage
32+
uses: codecov/codecov-action@v1
2533
with:
2634
token: ${{ secrets.CODECOV_TOKEN }}
2735
file: ./tmp/cover.out
28-
- run: make demo
36+
- name: Run demo
37+
run: make demo

.go-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.18

0 commit comments

Comments
 (0)