Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: introduce proto breakage detector #2671

Merged
merged 5 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/protobuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ jobs:
fi
# yamllint enable

# add this back when we start using versioning
# breakage:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: check-breakage
# run: make proto-check-breaking
breakage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: check-breakage
cmwaters marked this conversation as resolved.
Show resolved Hide resolved
run: make proto-check-breaking
rootulp marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bu
IMAGE := ghcr.io/tendermint/docker-build-proto:latest
DOCKER_PROTO_BUILDER := docker run -v $(shell pwd):/workspace --workdir /workspace $(IMAGE)
PROJECTNAME=$(shell basename "$(PWD)")
HTTPS_GIT := https://github.com/celestiaorg/celestia-app.git

# process linker flags
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=celestia-app \
Expand Down Expand Up @@ -57,6 +58,11 @@ proto-lint:
@$(DOCKER_BUF) lint --error-format=json
.PHONY: proto-lint

## proto-check-breaking checks if their is any breaking change to the protos
cmwaters marked this conversation as resolved.
Show resolved Hide resolved
proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=v1.x
cmwaters marked this conversation as resolved.
Show resolved Hide resolved
.PHONY: proto-lint
cmwaters marked this conversation as resolved.
Show resolved Hide resolved

## proto-format: Format protobuf files. Requires docker.
proto-format:
@echo "--> Formatting Protobuf files"
Expand Down
Loading