mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-06 03:53:50 +08:00
add glangci-lint to ci
This commit is contained in:
parent
203b68b740
commit
1b3842fc98
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@ -27,15 +27,12 @@ jobs:
|
|||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Go environment
|
- name: Setup Go environment
|
||||||
uses: actions/setup-go@v2.1.3
|
uses: actions/setup-go@v2.1.3
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.15
|
||||||
|
|
||||||
- name: Build binary file
|
- name: Build binary file
|
||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
@ -47,7 +44,6 @@ jobs:
|
|||||||
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"
|
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"
|
||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
go build -o "output/$BINARY_NAME" -ldflags "$LD_FLAGS" .
|
go build -o "output/$BINARY_NAME" -ldflags "$LD_FLAGS" .
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
if: ${{ !github.head_ref }}
|
if: ${{ !github.head_ref }}
|
||||||
@ -55,4 +51,12 @@ jobs:
|
|||||||
name: ${{ matrix.goos }}_${{ matrix.goarch }}
|
name: ${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
path: output/
|
path: output/
|
||||||
|
|
||||||
|
golangci:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
with:
|
||||||
|
version: v1.29
|
||||||
|
Loading…
x
Reference in New Issue
Block a user