Skip to content

Commit

Permalink
added golangci-lint to github actions
Browse files Browse the repository at this point in the history
made go version a env var
  • Loading branch information
tomvodi committed Aug 31, 2024
1 parent dc42589 commit 7f87f4e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,28 @@

name: Go

env:
GO_VERSION: '1.22.4'

on:
push:
pull_request:
branches: [ "master" ]

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60

# Label of the runner job
runner-job:
# You must use a Linux environment when using service containers or container jobs
Expand Down Expand Up @@ -40,9 +56,9 @@ jobs:
run: cp limepipes.env.default limepipes.env

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.22.4'
go-version: ${{ env.GO_VERSION }}

- name: Test
run: go test -v ./...
Expand Down

0 comments on commit 7f87f4e

Please sign in to comment.