-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.29 KB
/
protoc.yml
File metadata and controls
46 lines (41 loc) · 1.29 KB
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
name: proto_checks
on: [pull_request]
jobs:
proto_checks:
name: proto lint, breaking changes detection and generating stubs from protos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: wizhi/setup-buf@v1
with:
version: '0.36.0'
- uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: Fetching base branch
run: |
git fetch -u origin ${{ github.base_ref }}:${{ github.base_ref }}
- name: Running linter, checking breaking changes
run: |
buf lint
buf breaking --against ".git#branch=${{ github.base_ref }}"
- name: Installing protoc-gen-go
run: |
go get github.com/golang/protobuf/protoc-gen-go
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
# - name: Generating protos
# run: |
# protoc -I=$PROTO_DIR \
# --go_out=$GEN_OUT_DIR \
# $(find $PROTO_DIR -type f -name '*.proto')
# env:
# GEN_OUT_DIR: contracts/build/go
# PROTO_DIR: contracts/proto
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generating proto stubs
run: |
task generate