From ad5573d2ed5832845cf4ce7ef30595d6e7f347f7 Mon Sep 17 00:00:00 2001 From: Randell Date: Sat, 30 Nov 2024 09:48:16 -0700 Subject: [PATCH] Add linter step --- .github/workflows/go.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a3ab74f..f9f5d82 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,20 +5,28 @@ on: pull_request: branches: [ main ] jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 1.21.x + - run: go mod download + - name: Lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest build: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.x - uses: actions/setup-go@v5 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: 1.21.x - id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - name: Get dependencies - run: | - go get -v -t -d ./... + - run: go mod download - name: Test and Calculate Coverage run: go test -v -covermode=count -coverprofile=coverage.out - name: Convert coverage to lcov