Skip to content

Commit

Permalink
Merge pull request #12 from s0rg/feature/release-1.4.3
Browse files Browse the repository at this point in the history
deps up, workflows grouming
  • Loading branch information
s0rg authored Sep 10, 2024
2 parents 238114c + a45f157 commit 49df942
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 54 deletions.
22 changes: 11 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# dependabot settings
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
target-branch: "develop"
- package-ecosystem: gomod
directory: /
target-branch: master
labels:
- "gomod dependencies"
- gomod
schedule:
interval: "weekly"
day: "friday"
interval: weekly
day: friday
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "develop"
directory: /
target-branch: master
labels:
- "github-actions dependencies"
- github-actions
schedule:
interval: "weekly"
day: "friday"
interval: weekly
day: friday
32 changes: 13 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,26 @@ jobs:
name: ci
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup golang
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ^1.20
check-latest: true
cache: true
go-version: ^1.23
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
test:
runs-on: ubuntu-latest
environment:
name: ci
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup golang
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ^1.20
check-latest: true
cache: true
go-version: ^1.23
- name: test-coverage
uses: paambaati/codeclimate-action@v5.0.0
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
Expand All @@ -53,18 +49,16 @@ jobs:
name: ci
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup golang
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ^1.20
check-latest: true
cache: true
go-version: ^1.23
- name: init codeql
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'go'
- name: run analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
- name: update goreportcard
uses: creekorful/[email protected]
6 changes: 1 addition & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
run:
allow-parallel-runners: true
go: '1.19'

output:
format: 'colored-line-number'
print-issued-lines: true
print-linter-name: true
sort-results: true
Expand All @@ -12,20 +10,18 @@ linters:
enable-all: true
disable:
- gochecknoglobals
- exhaustivestruct
- forcetypeassert
- nonamedreturns
- exhaustruct
- testpackage
- structcheck
- varnamelen
- intrange
- depguard
- ireturn
- gofumpt

linters-settings:
govet:
check-shadowing: true
enable-all: true
funlen:
lines: 65
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
module github.com/s0rg/grid

go 1.21.5
go 1.23

toolchain go1.23.1

require (
github.com/s0rg/array2d v1.1.1
github.com/s0rg/set v1.2.0
github.com/s0rg/set v1.2.1
github.com/s0rg/vec2d v1.2.0
github.com/zyedidia/generic v1.2.1
)

require (
github.com/segmentio/fasthash v1.0.3 // indirect
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
github.com/s0rg/array2d v1.1.1 h1:fPZDbolqx9P0gCaD9yFTZT0TcWa6o/gK4t0YnGRpp/0=
github.com/s0rg/array2d v1.1.1/go.mod h1:XUVXpxRB1bSnngbrTAyfEcLl6GP+8OpyFLEkwvQOukI=
github.com/s0rg/set v1.2.0 h1:53b207YMktNQJXYei/oHuTR5oOO2e9+eieZOncYsh9g=
github.com/s0rg/set v1.2.0/go.mod h1:xz3nDbjF4nyMLvAHvmE7rigXpNrKKTsi6iANznIB1/4=
github.com/s0rg/set v1.2.1 h1:OMm/sxnO0tIqINEFdr7RbvMWLEFrdleNOuoEQNMTnGk=
github.com/s0rg/set v1.2.1/go.mod h1:/7U/8G00WOM4Nhlww3hXj7Q96Pw+bFinc17N5sh0l8E=
github.com/s0rg/vec2d v1.2.0 h1:ilCq4dWAZtPy+VFmyc4mUIxonXCeXxFDwE0o5Y48V5U=
github.com/s0rg/vec2d v1.2.0/go.mod h1:+V8qlJQahzxDQ2gRs6b6JWBePp3z48CHYc5qO6Ciik8=
github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
github.com/zyedidia/generic v1.2.1 h1:Zv5KS/N2m0XZZiuLS82qheRG4X1o5gsWreGb0hR7XDc=
github.com/zyedidia/generic v1.2.1/go.mod h1:ly2RBz4mnz1yeuVbQA/VFwGjK3mnHGRj1JuoG336Bis=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
24 changes: 12 additions & 12 deletions grid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,23 @@ func TestMapNeighbours(t *testing.T) {
t.Parallel()

const (
W, H = 5, 5
min, mid, max = 0, 2, 4
W, H = 5, 5
minV, midV, maxV = 0, 2, 4
)

var cases = []struct {
Point image.Point
Count int
}{
{Point: image.Pt(min, min), Count: 2},
{Point: image.Pt(mid, min), Count: 3},
{Point: image.Pt(max, min), Count: 2},
{Point: image.Pt(max, mid), Count: 3},
{Point: image.Pt(max, max), Count: 2},
{Point: image.Pt(mid, max), Count: 3},
{Point: image.Pt(min, max), Count: 2},
{Point: image.Pt(min, mid), Count: 3},
{Point: image.Pt(mid, mid), Count: 4},
{Point: image.Pt(minV, minV), Count: 2},
{Point: image.Pt(midV, minV), Count: 3},
{Point: image.Pt(maxV, minV), Count: 2},
{Point: image.Pt(maxV, midV), Count: 3},
{Point: image.Pt(maxV, maxV), Count: 2},
{Point: image.Pt(midV, maxV), Count: 3},
{Point: image.Pt(minV, maxV), Count: 2},
{Point: image.Pt(minV, midV), Count: 3},
{Point: image.Pt(midV, midV), Count: 4},
}

m := New[struct{}](image.Rect(0, 0, W, H))
Expand Down Expand Up @@ -535,7 +535,7 @@ func TestMapDijkstraEmpty(t *testing.T) {

m := New[struct{}](image.Rect(0, 0, W, H))

d := m.DijkstraMap([]image.Point{}, func(p image.Point, _ struct{}) (ok bool) {
d := m.DijkstraMap([]image.Point{}, func(_ image.Point, _ struct{}) (ok bool) {
return false
})

Expand Down

0 comments on commit 49df942

Please sign in to comment.