-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from fond-of-vertigo/refactor/interfaces-linter
Add golangci-lint
- Loading branch information
Showing
17 changed files
with
515 additions
and
526 deletions.
There are no files selected for viewing
56 changes: 30 additions & 26 deletions
56
.github/workflows/integration-tests.yml → .github/workflows/ci.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
name: Integration tests | ||
on: | ||
push: | ||
branches: | ||
- pull_request | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
NATS_SERVER_URL: "nats://127.0.0.1:4222" | ||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup GO | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "stable" | ||
- name: Check out Go client code | ||
uses: actions/checkout@v3 | ||
- name: Install NATS server | ||
run: | | ||
curl -sL https://github.com/nats-io/nats-server/releases/download/v2.9.15/nats-server-v2.9.15-linux-amd64.tar.gz | tar xzvf - | ||
cd nats-server-v2.9.15-linux-amd64 && ./nats-server -p 4222 -js & | ||
- name: Run unit and integration tests | ||
name: Continuous Integration | ||
on: | ||
push: | ||
branches: | ||
- pull_request | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
NATS_SERVER_URL: "nats://127.0.0.1:4222" | ||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup GO | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "stable" | ||
- name: Check out Go client code | ||
uses: actions/checkout@v3 | ||
- name: Run golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
skip-pkg-cache: true | ||
- name: Install NATS server | ||
run: | | ||
curl -sL https://github.com/nats-io/nats-server/releases/download/v2.9.15/nats-server-v2.9.15-linux-amd64.tar.gz | tar xzvf - | ||
cd nats-server-v2.9.15-linux-amd64 && ./nats-server -p 4222 -js & | ||
- name: Run unit and integration tests | ||
run: make test-all |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
run: | ||
deadline: 5m | ||
|
||
output: | ||
sort-results: true | ||
|
||
linters: | ||
enable: | ||
- asciicheck | ||
- dogsled | ||
- durationcheck | ||
- errcheck | ||
- exportloopref | ||
- gci | ||
- gofumpt | ||
- goimports | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- nilerr | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- revive | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
|
||
issues: | ||
max-same-issues: 0 | ||
exclude-use-default: false | ||
exclude: | ||
- should have a package comment | ||
|
||
|
||
linters-settings: | ||
gofumpt: | ||
extra-rules: true | ||
simplify: true | ||
|
||
gci: | ||
sections: | ||
- standard | ||
- default | ||
- prefix(github.com/fond-of-vertigo/vnats) |
This file contains 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
Oops, something went wrong.