2021-11-05 19:04:51 +08:00
|
|
|
name: Golangci-lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
2022-05-05 09:31:24 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-11-05 19:04:51 +08:00
|
|
|
jobs:
|
|
|
|
golangci:
|
2022-05-05 09:31:24 +08:00
|
|
|
permissions:
|
|
|
|
contents: read # for actions/checkout to fetch code
|
|
|
|
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
|
2021-11-05 19:04:51 +08:00
|
|
|
name: lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup go
|
2022-04-11 09:27:53 +08:00
|
|
|
uses: actions/setup-go@v3
|
2021-11-05 19:04:51 +08:00
|
|
|
with:
|
|
|
|
go-version: 1.17
|
|
|
|
- name: Checkout repository
|
2022-03-02 09:20:36 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-11-05 19:04:51 +08:00
|
|
|
- name: Setup golangci-lint
|
2022-02-25 09:18:01 +08:00
|
|
|
uses: golangci/golangci-lint-action@v3
|
2021-11-05 19:04:51 +08:00
|
|
|
with:
|
2021-11-06 00:04:18 +08:00
|
|
|
args: --verbose
|
2021-11-05 19:04:51 +08:00
|
|
|
version: latest
|