Skip to content

Commit 1b21635

Browse files
authored
chore: protobuf lint (#3)
* chore: added linter for protobufs * chore: added protoc install on ci
1 parent cbc68e8 commit 1b21635

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

.github/workflows/docs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
- uses: dtolnay/rust-toolchain@nightly
2222
with:
2323
toolchain: nightly-2024-07-27
24+
- name: Install Protoc
25+
uses: arduino/setup-protoc@v3
2426
- uses: Swatinem/rust-cache@v2
2527
with:
2628
cache-on-failure: true

.github/workflows/lint.yml

+14
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
with:
2020
persist-credentials: false
2121
- uses: dtolnay/rust-toolchain@clippy
22+
- name: Install Protoc
23+
uses: arduino/setup-protoc@v3
2224
- uses: Swatinem/rust-cache@v2
2325
with:
2426
cache-on-failure: true
@@ -41,6 +43,8 @@ jobs:
4143
- uses: dtolnay/rust-toolchain@nightly
4244
with:
4345
toolchain: nightly-2024-07-27
46+
- name: Install Protoc
47+
uses: arduino/setup-protoc@v3
4448
- uses: taiki-e/install-action@cargo-hack
4549
- uses: Swatinem/rust-cache@v2
4650
with:
@@ -99,6 +103,15 @@ jobs:
99103
run: |
100104
taplo fmt --check
101105
106+
proto:
107+
name: Lint Protocol Buffers
108+
runs-on: ubuntu-latest
109+
steps:
110+
- uses: actions/checkout@v4
111+
with:
112+
persist-credentials: false
113+
- uses: bufbuild/buf-action@v1
114+
102115
lint-success:
103116
name: Check that lints passed
104117
runs-on: ubuntu-latest
@@ -109,6 +122,7 @@ jobs:
109122
- fmt
110123
- codespell
111124
- taplo
125+
- proto
112126
timeout-minutes: 30
113127
steps:
114128
- name: Decide whether the needed jobs succeeded or failed

.github/workflows/unit.yml

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
with:
3333
components: llvm-tools-preview
3434
toolchain: nightly-2024-07-27
35+
- name: Install Protoc
36+
uses: arduino/setup-protoc@v3
3537
- name: Install latest nextest release
3638
uses: taiki-e/install-action@v2
3739
with:
@@ -76,6 +78,10 @@ jobs:
7678
- uses: dtolnay/rust-toolchain@nightly
7779
with:
7880
toolchain: nightly-2024-07-27
81+
82+
- name: Install Protoc
83+
uses: arduino/setup-protoc@v3
84+
7985
- uses: Swatinem/rust-cache@v2
8086
with:
8187
cache-on-failure: true

buf.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: v2
2+
modules:
3+
- path: proto
4+
lint:
5+
use:
6+
- STANDARD
7+
except:
8+
- PACKAGE_VERSION_SUFFIX
9+
- ENUM_VALUE_PREFIX

0 commit comments

Comments
 (0)