Skip to content

Commit

Permalink
Switch to the shared lint action
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschorr committed Apr 26, 2022
1 parent 243e79c commit df0bc3e
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/build.yaml
Expand Up @@ -10,35 +10,17 @@ on:
- "*"
jobs:
lint:
name: "Lint"
name: "Lint Go"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/setup-go@v2"
with:
go-version: "^1.16"
- name: "Install linting tools"
# This is done before checking out, as to not modify go.mod
run: "go install mvdan.cc/gofumpt/gofumports@v0.1.1"
- uses: "actions/checkout@v2"
- uses: "bewuethr/yamllint-action@v1.1.1"
with:
config-file: ".yamllint"
- name: "Go Mod Tidy"
run: "go mod tidy && bash -c '[ $(git status --porcelain | tee /dev/fd/2 | wc -c) -eq 0 ]'"
- name: "Formatting (gofumpt)"
run: |
GOFUMPT_OUTPUT="$(find . -iname '*.go' -type f | grep -v pb.go | grep -v 'pb.*.go' | xargs gofumports -d)"
if [ -n "$GOFUMPT_OUTPUT" ]; then
echo "All the following files are not correctly formatted"
echo "${GOFUMPT_OUTPUT}"
exit 1
fi
- uses: "golangci/golangci-lint-action@v2"
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
version: "v1.43"
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: false
go-version: "~1.18"
- uses: "authzed/actions/gofumpt@main"
- uses: "authzed/actions/go-mod-tidy@main"
- uses: "authzed/actions/go-generate@main"
- uses: "authzed/actions/golangci-lint@main"

test:
name: "Test"
Expand Down

0 comments on commit df0bc3e

Please sign in to comment.