2021-05-15 12:44:35 +02:00
|
|
|
name: golangci-lint
|
2022-02-01 11:53:24 +01:00
|
|
|
on: [pull_request]
|
2023-10-07 21:45:46 +02:00
|
|
|
|
2024-01-08 12:25:35 +01:00
|
|
|
permissions:
|
2023-10-07 21:45:46 +02:00
|
|
|
contents: read
|
|
|
|
pull-requests: read
|
|
|
|
|
2023-04-13 17:00:01 +02:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
|
|
|
|
cancel-in-progress: true
|
2023-10-07 21:45:46 +02:00
|
|
|
|
2021-05-15 12:44:35 +02:00
|
|
|
jobs:
|
2023-11-07 13:37:57 +01:00
|
|
|
codespell:
|
|
|
|
name: codespell
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: codespell
|
|
|
|
uses: codespell-project/actions-codespell@v2
|
|
|
|
with:
|
|
|
|
ignore_words_list: erro,clienta
|
|
|
|
skip: go.mod,go.sum
|
|
|
|
only_warn: 1
|
2021-05-15 12:44:35 +02:00
|
|
|
golangci:
|
2023-10-07 21:45:46 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2021-05-15 12:44:35 +02:00
|
|
|
name: lint
|
2023-10-07 21:45:46 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
timeout-minutes: 15
|
2021-05-15 12:44:35 +02:00
|
|
|
steps:
|
2023-09-04 17:03:44 +02:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2022-08-18 18:22:15 +02:00
|
|
|
- name: Install Go
|
2023-09-04 17:03:44 +02:00
|
|
|
uses: actions/setup-go@v4
|
2022-08-18 18:22:15 +02:00
|
|
|
with:
|
2024-01-08 12:25:35 +01:00
|
|
|
go-version: "1.21.x"
|
2023-10-07 21:45:46 +02:00
|
|
|
cache: false
|
2022-03-20 17:36:35 +01:00
|
|
|
- name: Install dependencies
|
2023-10-07 21:45:46 +02:00
|
|
|
if: matrix.os == 'ubuntu-latest'
|
2024-04-05 20:38:49 +02:00
|
|
|
run: sudo apt update && sudo apt install -y -q libgtk-3-dev libayatana-appindicator3-dev libgl1-mesa-dev xorg-dev
|
2021-05-15 12:44:35 +02:00
|
|
|
- name: golangci-lint
|
2023-10-07 21:45:46 +02:00
|
|
|
uses: golangci/golangci-lint-action@v3
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: --timeout=12m
|