Add static checker for validate.proto (#474) #1088
This file contains hidden or 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] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: {} # support manual runs | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| test-and-lint: | |
| name: Test and lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: tools/go.mod | |
| cache-dependency-path: go.work.sum | |
| - run: make lint-protovalidate | |
| - run: make test-go | |
| - run: make lint-go | |
| checkgenerate: | |
| name: Check generate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: bazel-contrib/setup-bazel@0.18.0 | |
| with: | |
| bazelisk-cache: true | |
| disk-cache: ${{ github.workflow }} | |
| repository-cache: true | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: tools/go.mod | |
| cache-dependency-path: go.work.sum | |
| - uses: bufbuild/buf-action@v1 | |
| with: | |
| setup_only: true | |
| - run: mkdir -p .tmp/bin && cp $(which buf) .tmp/bin/buf | |
| - run: make checkgenerate |