From 8ff38534a895e96f5279383a682d7f0297902e22 Mon Sep 17 00:00:00 2001 From: Matt Leader Date: Tue, 30 Jan 2024 14:17:41 -0500 Subject: [PATCH] upgrade golang (#10) * upgrade golang * upgrade go-assert * fix breaking change * add dg test --- .github/workflows/build.yml | 19 +++++++++---------- dg_test.go | 4 ++-- go.mod | 4 ++-- go.sum | 4 ++-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdef747..2450a81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/dg_test.go b/dg_test.go index d8a9077..2d57fe7 100644 --- a/dg_test.go +++ b/dg_test.go @@ -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) @@ -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) { diff --git a/go.mod b/go.mod index 85740f3..9b85b40 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index cee32f6..bd85c3e 100644 --- a/go.sum +++ b/go.sum @@ -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=