Skip to content

Commit

Permalink
Update ci-related stuff, fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pomo-mondreganto committed Nov 10, 2024
1 parent cae7cfc commit cd10ee4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ jobs:
go-version-file: 'go.mod'

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --config .golangci.yml

- name: Run tests
run: make test-cov
Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
run:
timeout: 5m
tests: true
skip-dirs:
- pkg/apps/.*

linters:
enable:
Expand All @@ -13,7 +11,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- gocritic
- gofmt
- goimports
Expand Down
4 changes: 2 additions & 2 deletions pkg/pubsub/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func TestPubSub_slowpoke(t *testing.T) {
wgSlow.Wait()
}()

slowSub := p.Subscribe(func(msg string) error {
slowSub := p.Subscribe(func(string) error {
defer wgSlow.Done()

select {
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestPubSub_slowpoke(t *testing.T) {
func TestPubSub_unsubscribe(t *testing.T) {
p := NewPubSub[string]()

sub1 := p.Subscribe(func(msg string) error {
sub1 := p.Subscribe(func(string) error {
t.Error("first subscriber must not be called")
return nil
})
Expand Down
5 changes: 2 additions & 3 deletions pkg/testutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ func RandomString(length int) string {
return RandomStringWithCharset(length, charset)
}

func RandomInt(min, max int) int {
n := seededRand.Intn(max - min)
return min + n
func RandomInt(mn, mx int) int {
return mn + seededRand.Intn(mx-mn)
}

func RandomIP() string {
Expand Down
2 changes: 1 addition & 1 deletion proto/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ breaking:
- WIRE_JSON
lint:
use:
- DEFAULT
- STANDARD
except:
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_STANDARD_NAME
Expand Down

0 comments on commit cd10ee4

Please sign in to comment.