Setup CI in GitHub Action #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release-**' | |
pull_request: | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
- name: Install protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Install protoc-gen-go | |
run: | | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34 | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3 | |
- name: Verify codegen | |
run: | | |
make gen | |
if [ -n "$(git status --porcelain)" ]; then | |
echo $(git status --porcelain) | |
echo "codegen is out of date. Please run \"make gen\" to update." | |
exit 1 | |
else | |
echo "codegen is up to date." | |
fi |