Skip to content

Commit

Permalink
chore: Factor golangci-lint check out into its own job
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Oct 9, 2021
1 parent 97af259 commit c4c0370
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
- name: Test
run: |
( cd assets/docker && ./test.sh voidlinux )
generate:
check:
runs-on: ubuntu-18.04
steps:
- name: Set up Go
Expand All @@ -283,26 +283,6 @@ jobs:
run: |
go generate
git diff --exit-code
lint:
runs-on: ubuntu-18.04
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v2
- name: Cache Go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v${{ env.GOLANGCI_LINT_VERSION }}
- name: ShellCheck
uses: ludeeus/action-shellcheck@1.1.0
with:
Expand All @@ -313,10 +293,19 @@ jobs:
run: |
go install github.com/twpayne/findtypos@latest
findtypos chezmoi .
lint:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v${{ env.GOLANGCI_LINT_VERSION }}
release: # FIXME this should be merged into test-ubuntu above
if: startsWith(github.ref, 'refs/tags/')
needs:
- generate
- check
- lint
- test-debian-i386
- test-fedora
Expand Down

0 comments on commit c4c0370

Please sign in to comment.