chore: update github action
parent
eb994a0c95
commit
f56394b86a
|
@ -4,9 +4,21 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "**.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "**.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
@ -16,13 +28,8 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.20"
|
||||
check-latest: true
|
||||
cache: true
|
||||
- run: go test -race -coverprofile=coverage.out ./...
|
||||
- uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: coverage.out
|
||||
go-version: "stable"
|
||||
- run: go test -race -failfast ./...
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -33,9 +40,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.20"
|
||||
check-latest: true
|
||||
cache: true
|
||||
go-version: "stable"
|
||||
- run: go build ./cmd/update-go-mod
|
||||
golangci-lint:
|
||||
name: golangci-lint
|
||||
|
@ -46,9 +51,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.20"
|
||||
check-latest: true
|
||||
cache: true
|
||||
go-version: "stable"
|
||||
- uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: latest
|
||||
|
|
|
@ -17,9 +17,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.20"
|
||||
check-latest: true
|
||||
cache: true
|
||||
go-version: "stable"
|
||||
- uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
distribution: goreleaser
|
||||
|
|
Loading…
Reference in New Issue