Skip to content

Commit

Permalink
chore: add buf breaking change detection to CI
Browse files Browse the repository at this point in the history
For now this will just add warnings to the PR, but once we've stabilised
we should make these errors.
  • Loading branch information
alecthomas committed Nov 6, 2023
1 parent 8a388d7 commit 5e9a06d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,34 @@ jobs:
run: go-check-sumtype ./...
- name: shellcheck
run: shellcheck -e SC2016 scripts/*
proto-breaking:
name: Proto Breaking Change Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Proto Breaking Change Check
run: |
set -euo pipefail
buf breaking --against .git#branch=main | while read -r line; do
# Extract the file path, line number, and column number from the warning message
file_path=$(echo "$line" | cut -d':' -f1)
line_number=$(echo "$line" | cut -d':' -f2)
column_number=$(echo "$line" | cut -d':' -f3)
# Output the warning message in the format expected by GitHub Actions
echo "::warning file=$file_path,line=$line_number,col=$column_number::$line"
done
console:
name: Console
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Console NPM Install
Expand Down
2 changes: 1 addition & 1 deletion protos/xyz/block/ftl/v1/ftl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ message PingResponse {
message Metadata {
message Pair {
string key = 1;
string value = 2;
int32 value = 2;
}
repeated Pair values = 1;
}
Expand Down

0 comments on commit 5e9a06d

Please sign in to comment.