添加 .gitea/workflow/1.yml
This commit is contained in:
55
.gitea/workflow/1.yml
Normal file
55
.gitea/workflow/1.yml
Normal file
@ -0,0 +1,55 @@
|
||||
name: check
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
env:
|
||||
GOPROXY: https://git-bot:${{ secrets.GOPROXY_PASSWORD }}@goproxy.git.sillyguodong.online
|
||||
GONOSUMDB: git.sillyguodong.online # don't set GOPRIVATE because it's available for GOPROXY
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set http.sslBackend
|
||||
run: |
|
||||
git config --global http.sslBackend "openssl"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
# with:
|
||||
# token: ${{ secrets.BOT_PAT }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Tidy
|
||||
run: |
|
||||
go mod tidy
|
||||
git add --all && git diff --name-only --exit-code HEAD
|
||||
|
||||
- name: Generate
|
||||
run: |
|
||||
go generate ./...
|
||||
git add --all && git diff --name-only --exit-code HEAD
|
||||
|
||||
- name: Format
|
||||
run: |
|
||||
go fmt ./...
|
||||
git add --all && git diff --name-only --exit-code HEAD
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -race -covermode=atomic ./...
|
||||
|
||||
- name: Vet
|
||||
run: go vet -v ./...
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: latest
|
||||
Reference in New Issue
Block a user