-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (63 loc) · 1.89 KB
/
pr.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Pull Request Verification
on:
pull_request:
push:
branches:
- main
# Kill the workflow if the PR is updated with a new commit
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
buf:
name: Verify buf
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup buf CLI
uses: bufbuild/buf-setup-action@v1
- name: Lint Protobuf sources
uses: bufbuild/buf-lint-action@v1
with:
input: proto
- name: Build Protobuf sources
run: buf build
working-directory: proto
- name: Breaking Change Detection
uses: bufbuild/buf-breaking-action@v1
id: breaking
with:
input: proto
against: 'https://github.com/alehechka/grpc-graphql-gateway.git#branch=main,subdir=proto'
protoc:
name: Verify examples
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup buf CLI
uses: bufbuild/buf-setup-action@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
# version: '3.21.4'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- name: Download Module Dependencies
run: go mod download
- name: Install protobuf plugins
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
- name: Tests
run: make test
- name: Build example/starwars
run: make build_all
working-directory: example/starwars
- name: Build example/greeter
run: make build_all
working-directory: example/greeter