mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-06-28 02:05:23 +00:00
38 lines
798 B
YAML
38 lines
798 B
YAML
name: Linter
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- "**/*.go"
|
|
pull_request:
|
|
branches: [master]
|
|
types: [opened, synchronize, reopened]
|
|
paths:
|
|
- "**/*.go"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ^1.15
|
|
|
|
- name: Checkout codebase
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache go module
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: ${{ runner.os }}-go-
|
|
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: v1.31
|
|
args: --config=.github/linters/.golangci.yml
|