-
Notifications
You must be signed in to change notification settings - Fork 108
50 lines (47 loc) · 1.48 KB
/
protocol-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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Protocol Lint
# Lint runs all linting jobs.
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- "protocol/**"
push:
branches:
- main
- "release/protocol/v[0-9]+.[0-9]+.x" # e.g. release/protocol/v0.1.x
- "release/protocol/v[0-9]+.x" # e.g. release/protocol/v1.x
paths:
- "protocol/**"
# Ensure only a single instance of this workflow is running, and cancel any that are in-progress
# before this workflow instance starts
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# Validates that the YAML files in the repository are formatted properly.
# The `validate-yaml` job will pass without running if no YAML files have been modified.
validate-yaml:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
steps:
- uses: actions/checkout@v3
- name: Validate config YAML file
run: >
yamllint .golangci.yml .github/workflows/**.yml
buf.work.yaml
# Runs golangci-lint over the entire repository.
# The `golangci` job will pass without running if no *.{go, mod, sum} files have been modified.
golangci:
name: golangci-lint
defaults:
run:
working-directory: ./protocol
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Run golangci-lint
run: make lint