Skip to content

Lint

Lint #151

Workflow file for this run

name: Lint
on:
pull_request_review:
branches:
- main
types: [submitted]
jobs:
lint:
# the ON keyword is ANY not AND for conditions regarding path. Need to work around with labelling for PRs.
if: contains(github.event.pull_request.labels.*.name, 'golang') && github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.22'
cache: false
# Run vet and cli-lint for static linting
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
- name: Run go vet
run: go vet ./...