修改go.yml,添加执行测试的action
This commit is contained in:
parent
845ec9c5fe
commit
9a48cb03af
1 changed files with 26 additions and 9 deletions
19
.github/workflows/go.yml
vendored
19
.github/workflows/go.yml
vendored
|
@ -7,7 +7,7 @@ on:
|
|||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
#编译
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -21,3 +21,20 @@ jobs:
|
|||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
#执行测试
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up GO
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
check-latest: true
|
||||
|
||||
- name: Test
|
||||
run: go test -run=Test .
|
||||
|
||||
- name: Benchmark
|
||||
run: go test -bench=Benchmark -benchmem .
|
||||
|
|
Reference in a new issue