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 230f42a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ 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:
strategy:
fail-fast: false
Expand Down Expand Up @@ -177,6 +191,7 @@ jobs:
name: allgreen
if: always()
needs:
- golangci
- 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 230f42a

Please sign in to comment.