2020-12-17 01:11:22 +00:00
|
|
|
name: golangci-lint
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-10-18 21:49:32 +00:00
|
|
|
- patch-*
|
2021-11-18 23:14:29 +00:00
|
|
|
paths:
|
|
|
|
- '**.go'
|
2020-12-17 01:11:22 +00:00
|
|
|
pull_request:
|
2021-11-18 23:14:29 +00:00
|
|
|
paths:
|
|
|
|
- '**.go'
|
2022-03-03 20:15:17 +00:00
|
|
|
workflow_dispatch: # Manual
|
|
|
|
|
2022-03-15 18:44:30 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-12-17 01:11:22 +00:00
|
|
|
jobs:
|
|
|
|
golangci:
|
2022-03-15 18:44:30 +00:00
|
|
|
permissions:
|
|
|
|
contents: read # for actions/checkout to fetch code
|
2022-06-10 21:52:24 +00:00
|
|
|
pull-requests: read # for actions/checkout to fetch pull requests
|
2020-12-17 01:11:22 +00:00
|
|
|
name: lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-15 18:44:30 +00:00
|
|
|
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
2022-06-10 21:52:24 +00:00
|
|
|
|
2022-07-18 17:24:51 +00:00
|
|
|
- uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
|
2022-04-04 20:14:05 +00:00
|
|
|
with:
|
|
|
|
go-version: '1.17'
|
2022-06-10 21:52:24 +00:00
|
|
|
|
|
|
|
- name: Run go lint
|
|
|
|
run: |
|
|
|
|
# The following packages are needed to build Fleet Desktop on Ubuntu.
|
|
|
|
sudo apt install -y gcc libgtk-3-dev libayatana-appindicator3-dev
|
|
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
|
|
|
|
make lint-go
|