2024-01-27 23:32:42 +01:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
|
2023-04-13 15:47:34 +02:00
|
|
|
name: Lint
|
|
|
|
|
2023-06-30 13:44:57 +02:00
|
|
|
permissions: {}
|
|
|
|
|
2023-04-13 15:47:34 +02: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
|
2024-06-13 22:40:59 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2023-09-27 10:24:27 +02:00
|
|
|
- name: Setup caches
|
|
|
|
uses: ./.github/actions/setup-caches
|
|
|
|
timeout-minutes: 5
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
build-cache-key: lint
|
2023-04-13 15:47:34 +02:00
|
|
|
- name: Setup build env
|
|
|
|
uses: ./.github/actions/setup-build-env
|
2023-08-30 22:44:51 +02:00
|
|
|
timeout-minutes: 10
|
2023-04-13 15:47:34 +02:00
|
|
|
- name: golangci-lint
|
2024-08-28 19:09:58 +02:00
|
|
|
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
|
2023-04-13 15:47:34 +02:00
|
|
|
with:
|
2024-08-28 19:09:58 +02:00
|
|
|
version: v1.60
|
2023-04-13 15:47:34 +02: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
|