Add CI Workflow for Protobuf Compilation
bflad opened this issue · comments
terraform-plugin-go version
v0.8.0
Use cases
The Protocol Buffers compilation via the protoc
tool is currently handled outside go generate
so all dependencies of that execution can be handled via Go modules and go get
. There can be changes to this ecosystem we would like to follow along for updates, so we should raise our confidence in these changes by introducing additional CI processes for this area.
Attempted solutions
Locally, switch to dependency upgrade branch, install protoc
(if not done so already), run protoc
, and check Git for differences.
Proposal
Introduce a new GitHub Actions based workflow specifically for protobuf changes, e.g. .github/workflows/ci-protobuf.yml
. That:
- Only has read-only permissions to the repository contents
- Only runs on the
pull_request
event of certain paths such as:.github/workflows/ci-protobuf.yml
go.mod
go.sum
tfprotov5/internal/tfplugin5/*
tfprotov6/internal/tfplugin6/*
- Checks out code
- Installs Go (e.g. actions/setup-go)
- Installs
protoc
(e.g. arduino/setup-protoc) - Runs
protoc
(refer also to generate.sh) - Checks Git for differences and fails if any are detected