Skip to content

Commit

Permalink
upgrade golang (#10)
Browse files Browse the repository at this point in the history
* upgrade golang

* upgrade go-assert

* fix breaking change

* add dg test
  • Loading branch information
mfleader committed Jan 30, 2024
1 parent 89b47ee commit 8ff3853
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Hard-coding version due to this bug: https://github.com/golangci/golangci-lint-action/issues/535
version: v1.52.2
version: v1.55.2
test:
name: go test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.21.6
- name: Set up gotestfmt
uses: GoTestTools/gotestfmt-action@v2
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
Expand Down Expand Up @@ -64,12 +63,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.18
- uses: actions/cache@v3
go-version: 1.21.6
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
Expand Down
4 changes: 2 additions & 2 deletions dg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestDirectedGraph_BasicNodeAdditionAndRemoval(t *testing.T) {
assert.NoError(t, err)
assert.Equals(t, n, n2)

assert.ErrorR[dgraph.Node[string]](t)(d.GetNodeByID("node-2"))
assert.ErrorR(t)(d.GetNodeByID("node-2"))

nodes := d.ListNodesWithoutInboundConnections()
assert.Equals(t, len(nodes), 1)
Expand All @@ -27,7 +27,7 @@ func TestDirectedGraph_BasicNodeAdditionAndRemoval(t *testing.T) {

nodes = d.ListNodesWithoutInboundConnections()
assert.Equals(t, len(nodes), 0)
assert.ErrorR[dgraph.Node[string]](t)(d.GetNodeByID("node-1"))
assert.ErrorR(t)(d.GetNodeByID("node-1"))
}

func TestDirectedGraph_ConnectSelf(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module go.arcalot.io/dgraph

go 1.18
go 1.21

require go.arcalot.io/assert v1.3.0
require go.arcalot.io/assert v1.7.0
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
go.arcalot.io/assert v1.3.0 h1:+uQex4s9gezATpTyFxUY5dlAcrwI1Me5fSmdcydGHho=
go.arcalot.io/assert v1.3.0/go.mod h1:Xy3ScX0p9IMY89gdsgexOKxnmDr0nGHG9dV7p8Uxg7w=
go.arcalot.io/assert v1.7.0 h1:PTLyeisNMUKpM9wXRDxResanBhuGOYO1xFK3v5b3FSw=
go.arcalot.io/assert v1.7.0/go.mod h1:nNmWPoNUHFyrPkNrD2aASm5yPuAfiWdB/4X7Lw3ykHk=

0 comments on commit 8ff3853

Please sign in to comment.