Skip to content

Commit

Permalink
Upgraded linter, github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bogcon committed Mar 26, 2024
1 parent d035281 commit 79fced8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
go-version: [1.21.x, 1.22.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Load cached dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
Expand All @@ -44,8 +44,9 @@ jobs:
run: make clean cover

- name: Upload coverage to coveralls.io
if: matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.21.x'
uses: shogo82148/actions-goveralls@v1
if: matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.22.x'
uses: coverallsapp/github-action@v2
with:
path-to-profile: cover.out
flag-name: ${{ runner.os }}/Go-${{ matrix.go-version }}
file: cover.out
flag-name: ${{ runner.os }}-go-${{ matrix.go-version }}
fail-on-error: false
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LINTER_VERSION=v1.55.2
LINTER_VERSION=v1.57.1
LINTER=./bin/golangci-lint
ifeq ($(OS),Windows_NT)
LINTER=./bin/golangci-lint.exe
Expand All @@ -9,7 +9,7 @@ all: clean setup lint test ## Run sequentially clean, setup, lint and test.

.PHONY: lint
lint: ## Run linter and detect go mod tidy changes.
$(LINTER) run -c ./.golangci-lint.yml --fix
$(LINTER) run -c ./.golangci-lint.yml --timeout 5m --fix
@make tidy
@if ! git diff --quiet; then \
echo "'go mod tidy' resulted in changes or working tree is dirty:"; \
Expand Down

0 comments on commit 79fced8

Please # to comment.