ING-916: Remove and ignore the generated OpenAPI file. #689
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: Run Linter | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- uses: arduino/setup-protoc@v1 | |
with: | |
version: 3.17 | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
go install google.golang.org/protobuf/cmd/[email protected] | |
go install google.golang.org/grpc/cmd/[email protected] | |
go install golang.org/x/tools/cmd/goimports@latest | |
- name: Generate Files | |
run: | | |
go generate ./dataapiv1 | |
if [ -n "$(git status --porcelain)" ]; then | |
echo 'To fix this check, run "go generate ./dataapiv1"' | |
git status # Show the files that failed to pass the check. | |
exit 1 | |
fi | |
- name: goimports | |
run: | | |
goimports -w . | |
find . -name go.mod -execdir go mod tidy \; | |
if [ -n "$(git status --porcelain)" ]; then | |
echo 'To fix this check, run "goimports -w . && find . -name go.mod -execdir go mod tidy \;"' | |
git status # Show the files that failed to pass the check. | |
exit 1 | |
fi | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
version: v1.55 | |
args: --timeout=3m | |
skip-pkg-cache: true | |
skip-build-cache: true |