mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-06-19 22:15:04 +08:00
38 lines
829 B
YAML
38 lines
829 B
YAML
name: Lint
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
golangci:
|
|
name: lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@v2.1.3
|
|
with:
|
|
go-version: 1.16
|
|
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: latest
|
|
|
|
- name: Cache downloaded module
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }}
|
|
|
|
- name: Tests
|
|
run: |
|
|
go test $(go list ./...)
|
|
|
|
- name: Suggester
|
|
uses: reviewdog/action-suggester@v1
|
|
with:
|
|
tool_name: golangci-lint
|