2020-07-31 14:14:34 +02:00
|
|
|
name: lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
2022-04-04 16:12:33 +02:00
|
|
|
paths:
|
2022-05-12 09:49:35 +02:00
|
|
|
- '.github/workflows/lint.yml'
|
2023-10-26 09:53:26 +02:00
|
|
|
- '.golangci.yml'
|
2022-04-04 16:12:33 +02:00
|
|
|
- '**.go'
|
|
|
|
- 'go.*'
|
2020-07-31 14:14:34 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2022-04-04 16:12:33 +02:00
|
|
|
paths:
|
2022-05-12 09:49:35 +02:00
|
|
|
- '.github/workflows/lint.yml'
|
2023-10-26 09:53:26 +02:00
|
|
|
- '.golangci.yml'
|
2022-04-04 16:12:33 +02:00
|
|
|
- '**.go'
|
|
|
|
- 'go.*'
|
2020-07-31 14:14:34 +02:00
|
|
|
|
2023-01-17 11:29:54 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-07-31 14:14:34 +02:00
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: golang
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
continue-on-error: true
|
|
|
|
steps:
|
2023-09-04 22:25:17 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-06 21:59:16 +01:00
|
|
|
- uses: actions/setup-go@v5
|
2022-04-05 10:49:12 +02:00
|
|
|
with:
|
2023-03-06 09:52:24 +01:00
|
|
|
go-version: "1.20"
|
2022-04-05 10:49:12 +02:00
|
|
|
|
2020-07-31 14:14:34 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-06-21 16:04:40 +02:00
|
|
|
sudo apt -y update && sudo apt -y install protobuf-compiler
|
2020-07-31 14:14:34 +02:00
|
|
|
make common
|
|
|
|
|
|
|
|
- name: lint
|
2024-04-29 22:31:34 +02:00
|
|
|
uses: golangci/golangci-lint-action@v5.1.0
|
2020-07-31 14:14:34 +02:00
|
|
|
with:
|
2022-02-11 10:32:23 +01:00
|
|
|
version: latest
|
2023-03-06 09:56:59 +01:00
|
|
|
args: --timeout=2m0s
|
2024-01-30 16:45:44 +01:00
|
|
|
skip-cache: true
|
|
|
|
skip-pkg-cache: true
|
|
|
|
skip-build-cache: true
|
2024-04-03 10:09:34 +02:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
name: dependencies
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
continue-on-error: true
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: "stable"
|
|
|
|
|
|
|
|
- name: Check minimum supported version of Go
|
|
|
|
run: |
|
|
|
|
go mod tidy -go=1.20 -compat=1.20
|
|
|
|
|
|
|
|
- name: Check go.mod / go.sum
|
|
|
|
run: |
|
|
|
|
git add go.*
|
|
|
|
git diff --cached --exit-code go.*
|