-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (32 loc) · 973 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: lint
on:
push:
branches:
- main
- 'scratch/**'
pull_request:
# Note: this avoids golangci/golangci-lint-action to work around an
# error triggered by us pinning to a golangci-lint version built with
# an older Go. Revisit when moving from golangci-lint v1.47.2.
#
# https://github.com/golangci/golangci-lint-action/issues/442#issuecomment-1203786890
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Install golangci-lint
shell: bash
run: |
bin=$(mktemp -d)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b "$bin" v1.59.1
echo "$bin" >>$GITHUB_PATH
- name: Run golangci-lint
shell: bash
run: |
command -v golangci-lint
golangci-lint run --out-format=github-actions