Skip to content

Commit

Permalink
ci: Add linter stage to workflow
Browse files Browse the repository at this point in the history
Ensure that submitted merge requests are run through a linter check to keep
high code quality.

Signed-off-by: Christopher Obbard <[email protected]>
  • Loading branch information
obbardc committed Jul 26, 2023
1 parent 1ea5f88 commit b723062
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,22 @@ on:
workflow_dispatch:

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/go-debos/test-containers/debos-trixie:main
steps:
- uses: actions/setup-go@v4
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3

test:
needs: lint
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -177,6 +192,7 @@ jobs:
name: allgreen
if: always()
needs:
- lint
- unit-tests
- recipe-tests
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
linters:
enable:
- gofmt
- stylecheck
- whitespace

0 comments on commit b723062

Please sign in to comment.