Skip to content

Commit

Permalink
chore(CI): add golangci-lint for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszKepczynskiSauce committed Sep 18, 2024
1 parent 547333d commit 97aa5cc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Go Lint

on:
push:
branches:
- master
pull_request:

jobs:
lint:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.22'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.56.0
args: --timeout 3m
5 changes: 2 additions & 3 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- uses: actions/checkout@v3
- name: Run Unit Tests
run: |
go test
go test -v

0 comments on commit 97aa5cc

Please sign in to comment.