Setup golangci lint action #163
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: | |
pull_request: | |
jobs: | |
ci: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Cache protobuf build | |
id: protocache | |
uses: actions/cache@v3 | |
with: | |
path: _vendor/protobuf-21.12 | |
key: protobuf-21.12 | |
- name: Compile protobuf | |
if: steps.protocache.outputs.cache-hit != 'true' | |
run: | | |
sudo apt-get install -y autoconf automake libtool curl make g++ unzip | |
./protobuf.sh | |
- run: make install && go mod tidy && go mod verify | |
- run: git --no-pager diff --exit-code | |
- uses: golangci/golangci-lint-action@v5 | |
with: | |
args: --verbose | |
- run: make genall | |
- run: git --no-pager diff --exit-code | |
- run: make test | |
- run: git --no-pager diff --exit-code |