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 17d4b46
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,25 @@ 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: |
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
Expand Down

0 comments on commit 17d4b46

Please sign in to comment.