-
Notifications
You must be signed in to change notification settings - Fork 208
66 lines (65 loc) · 1.89 KB
/
proto.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Protobuf
# Protobuf runs protobuf related CI checks:
# - buf (https://buf.build/) lint
# - buf check-breakage
# - check protobuf definitions are up-to-date
on:
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# This job is only run when a .proto file has been changed
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.proto
**/buf*.yaml
- name: lint
run: make proto-lint
working-directory: golang/cosmos
if: env.GIT_DIFF
# This job is only run when a .proto file has been changed
breakage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.proto
**/buf*.yaml
- name: check-breakage
run: make proto-check-breaking PR_TARGET_REPO=https://github.com/${{ github.repository }}.git PR_TARGET_BRANCH=${{ github.base_ref }}
working-directory: golang/cosmos
if: env.GIT_DIFF
up-to-date:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: ./.github/actions/restore-golang
with:
go-version: '1.20'
- name: check protobuf definitions are up-to-date
run: |
cd packages/cosmic-proto
./update-protos.sh
out=$(git status --porcelain)
test -n "$out" || exit 0
echo "Unexpected git status output:"
echo "$out"
echo "Please run (cd packages/cosmic-proto && ./update-protos.sh)"
echo "and commit the result."
exit 1