Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,42 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Lint
runs-on: ubuntu-latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered ubuntu-slim, but since this has go build (required for go vet) I decided to stick with ubuntu-latest...

Not a big deal either way.


permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod

# yamllint is pre-installed on GitHub Actions runners:
# https://github.com/adrienverge/yamllint/pull/588
- run: yamllint .

- run: go mod tidy -diff

- name: Ensure gofmt passes
run: |
UNFORMATTED=$(gofmt -l . | grep -v '^vendor/' || true) # gofmt doesn't ignore the `vendor` folder
if [ -n "$UNFORMATTED" ]; then
echo "$UNFORMATTED" | xargs gofmt -d
exit 1
fi

- run: go build ./... # gives better error messages then go vet when the build fails, and go vet will reuse the build cache

- run: go vet ./...

# The `github/codeql-action/start-proxy` action uses native binaries for
# Linux, macOS, and Windows.
build-codeql:
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/yamllint.yml

This file was deleted.

Loading