Files
gickup/.github/workflows/validate-lint.yml
Bernat Mut 617acfda96 chore: bump action versions in workflows to latest stable releases (#395)
* chore: bump action versions in workflows to latest stable releases

* fix: add revive var-naming exclusion for zip_test.go

* fix: correct formatting and structure in .goreleaser.yml

* fix: ensure fetch-depth is set for actions/checkout in workflow

* fix: update GoReleaser conditions for tag-based releases in workflow
2026-05-18 11:17:28 +02:00

56 lines
1.2 KiB
YAML

name: Validate lint
on:
pull_request:
branches:
- '*'
env:
GO_VERSION: 1.26
GOLANGCI_LINT_VERSION: v2.10.1
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/go/src/github.com/cooperspencer/gickup
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out code
uses: actions/checkout@v6
with:
path: go/src/github.com/cooperspencer/gickup
fetch-depth: 0
- name: Cache Go modules
uses: actions/cache@v5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-lint-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-lint-go
- name: Setup GOPATH
run: go env -w GOPATH=${{ github.workspace }}/go
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
working-directory: ${{ github.workspace }}/go/src/github.com/cooperspencer/gickup