Add golangci-lint with CI integration and fix all lint issues #56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: new | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: latest | |
| - name: Build | |
| run: go build ./cmd/netalchemy | |
| - name: Unit Tests | |
| run: go test ./... |