Skip to content

Commit

Permalink
Split linter into separate build step
Browse files Browse the repository at this point in the history
- Fixes "Cannot open: File exists" errors caused by running go get/test prior to lint
  • Loading branch information
sneal committed Aug 10, 2022
1 parent 19c6c21 commit 990bded
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ jobs:
- name: Run Test
run: make test
shell: bash
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build

on:
push:
branches:
- '*'
paths-ignore:
- README.md
pull_request:
branches:
- master

jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.17
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest

0 comments on commit 990bded

Please sign in to comment.