chore: optimize github action
parent
717e4d0a32
commit
ee08eaeca1
|
@ -4,9 +4,21 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "**.go"
|
||||||
|
- "go.mod"
|
||||||
|
- "go.sum"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "**.go"
|
||||||
|
- "go.mod"
|
||||||
|
- "go.sum"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
@ -16,9 +28,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version: "stable"
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- run: go test -race -failfast ./...
|
- run: go test -race -failfast ./...
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
|
@ -30,7 +40,5 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version: "stable"
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- run: go build .
|
- run: go build .
|
||||||
|
|
Loading…
Reference in New Issue