diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..e165f89 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,37 @@ +name: Lint +# Lint runs golangci-lint over the entire repository +# This workflow is run on every pull request and push to main +# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed. + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }}-lint + cancel-in-progress: true + +jobs: + golangci: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Go + uses: actions/setup-go@v3 + with: + # Set to the desired Go version + go-version: "1.22" + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.51.1 + args: --timeout 20m0s