2020-09-09 06:19:49 -04:00
|
|
|
name: Linter
|
2020-06-19 09:19:37 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-08-24 04:09:51 -04:00
|
|
|
branches: [master]
|
2020-06-19 09:19:37 -04:00
|
|
|
pull_request:
|
2020-08-24 04:09:51 -04:00
|
|
|
branches: [master]
|
2020-08-24 12:04:31 -04:00
|
|
|
types: [opened, synchronize, reopened]
|
2020-06-19 09:19:37 -04:00
|
|
|
|
|
|
|
jobs:
|
2020-08-24 04:09:51 -04:00
|
|
|
lint:
|
2020-06-19 09:19:37 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-08-30 13:09:45 -04:00
|
|
|
- name: Set up Go 1.x
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2020-09-09 06:19:49 -04:00
|
|
|
go-version: ^1.15
|
2020-08-30 13:09:45 -04:00
|
|
|
|
|
|
|
- name: Checkout codebase
|
2020-06-19 09:19:37 -04:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-08-30 13:09:45 -04:00
|
|
|
- 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: Lint other files
|
|
|
|
if: ${{ always() }}
|
2020-09-16 02:20:26 -04:00
|
|
|
uses: github/super-linter@v3.10.1
|
2020-06-19 09:19:37 -04:00
|
|
|
env:
|
2020-08-30 13:09:45 -04:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-06-27 08:50:41 -04:00
|
|
|
VALIDATE_ALL_CODEBASE: false
|
2020-08-30 13:09:45 -04:00
|
|
|
VALIDATE_BASH: false
|
|
|
|
VALIDATE_DOCKERFILE: false
|
|
|
|
VALIDATE_DOCKERFILE_HADOLINT: false
|
|
|
|
VALIDATE_GO: false
|
2020-06-27 08:50:41 -04:00
|
|
|
VALIDATE_JSON: false
|
2020-08-30 13:09:45 -04:00
|
|
|
VALIDATE_MD: false
|
|
|
|
VALIDATE_PROTOBUF: false
|
2020-09-02 23:33:23 -04:00
|
|
|
|
2020-09-09 05:50:36 -04:00
|
|
|
- name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
|
|
|
version: v1.31
|
|
|
|
args: --config=.github/linters/.golangci.yml
|