netbird/.github/workflows/golangci-lint.yml

53 lines
1.5 KiB
YAML
Raw Normal View History

2021-05-15 12:44:35 +02:00
name: golangci-lint
2022-02-01 11:53:24 +01:00
on: [pull_request]
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
cancel-in-progress: true
2021-05-15 12:44:35 +02:00
jobs:
codespell:
name: codespell
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: codespell
uses: codespell-project/actions-codespell@v2
with:
2024-04-23 19:23:43 +02:00
ignore_words_list: erro,clienta,hastable,
skip: go.mod,go.sum
only_warn: 1
2021-05-15 12:44:35 +02:00
golangci:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
2021-05-15 12:44:35 +02:00
name: lint
runs-on: ${{ matrix.os }}
timeout-minutes: 15
2021-05-15 12:44:35 +02:00
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for duplicate constants
if: matrix.os == 'ubuntu-latest'
run: |
! awk '/const \(/,/)/{print $0}' management/server/activity/codes.go | grep -o '= [0-9]*' | sort | uniq -d | grep .
- name: Install Go
uses: actions/setup-go@v5
with:
2024-09-12 13:46:28 +02:00
go-version: "1.23.x"
cache: false
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt update && sudo apt install -y -q libgtk-3-dev libayatana-appindicator3-dev libgl1-mesa-dev xorg-dev libpcap-dev
2021-05-15 12:44:35 +02:00
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=12m