-
Notifications
You must be signed in to change notification settings - Fork 19
41 lines (33 loc) · 960 Bytes
/
linter.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
34
35
36
37
38
39
40
41
# Copyright (C) 2023, Ava Labs, Inc. All rights reserved.
# See the file LICENSE for licensing terms.
name: Run Golang Linter
on:
push:
branches:
- main
pull_request:
branches:
- "**"
jobs:
golangci:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install buf
uses: bufbuild/[email protected]
- name: Run Lint
run: ./scripts/lint.sh --go-lint
- name: Ensure protobuf changes are checked in
run: |
scripts/protobuf_codegen.sh
git update-index --really-refresh >> /dev/null
git diff-index HEAD # to show the differences
git diff-index --quiet HEAD || (echo 'protobuf generated code changes have not all been checked in' && exit 1)