2024-01-27 22:32:42 +00:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
|
2023-04-13 13:47:34 +00:00
|
|
|
name: Lint
|
|
|
|
|
2023-06-30 11:44:57 +00:00
|
|
|
permissions: {}
|
|
|
|
|
2023-04-13 13:47:34 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'release*'
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-10-25 04:29:31 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2023-09-27 08:24:27 +00:00
|
|
|
- name: Setup caches
|
|
|
|
uses: ./.github/actions/setup-caches
|
|
|
|
timeout-minutes: 5
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
build-cache-key: lint
|
2023-04-13 13:47:34 +00:00
|
|
|
- name: Setup build env
|
|
|
|
uses: ./.github/actions/setup-build-env
|
2023-08-30 20:44:51 +00:00
|
|
|
timeout-minutes: 10
|
2023-04-13 13:47:34 +00:00
|
|
|
- name: golangci-lint
|
2023-08-15 07:53:28 +00:00
|
|
|
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
|
2023-04-13 13:47:34 +00:00
|
|
|
with:
|
2023-09-19 11:36:29 +00:00
|
|
|
version: v1.54.2
|
2023-04-13 13:47:34 +00:00
|
|
|
skip-cache: true
|
|
|
|
- name: go fmt check
|
|
|
|
run: make fmt-check
|
|
|
|
- name: goimports check
|
|
|
|
run: make imports-check
|
|
|
|
- name: Checking unused pkgs using go mod tidy
|
|
|
|
run: make unused-package-check
|
|
|
|
- name: Go vet
|
|
|
|
run: make vet
|