diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96eaf8be722..5c3d4962121 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,6 @@ jobs: steps: - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force - uses: actions/setup-go@v4 with: go-version: '1.19' @@ -60,9 +59,6 @@ jobs: - name: Test run: make test - # - name: Test HistoryV3 - # run: make test3 - tests-windows: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} strategy: @@ -72,7 +68,6 @@ jobs: steps: - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force - uses: actions/setup-go@v4 with: go-version: '1.19' diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index bad1a707948..474d71e6126 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,8 +10,6 @@ jobs: steps: - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force - - uses: actions/setup-go@v4 with: go-version: '1.19' diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index 39032d6e945..3726d1796c0 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -23,11 +23,11 @@ import ( "os" "os/exec" "path/filepath" - "runtime" "strings" "testing" "github.com/ledgerwatch/erigon-lib/common/dir" + "github.com/ledgerwatch/log/v3" ) var bindTests = []struct { @@ -1792,12 +1792,12 @@ var bindTests = []struct { // the requested tester run against it. func TestGolangBindings(t *testing.T) { // Skip the test if no Go command can be found - gocmd := runtime.GOROOT() + "/bin/go" + gocmd := "go" if !dir.FileExist(gocmd) { t.Skip("go sdk not found for testing") } // Create a temporary workspace for the test suite - ws := t.TempDir() + ws := "" //t.TempDir() pkg := filepath.Join(ws, "bindtest") if err := os.MkdirAll(pkg, 0700); err != nil { @@ -1843,6 +1843,14 @@ func TestGolangBindings(t *testing.T) { t.Fatalf("failed to convert binding test to modules: %v\n%s", err, out) } pwd, _ := os.Getwd() + replacer2 := exec.Command(gocmd, "version") + replacer2.Dir = pkg + if out, err := replacer2.CombinedOutput(); err != nil { + t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out) + } else { + log.Warn("go version", "v", string(out), "gocmd", gocmd) + } + replacer := exec.Command(gocmd, "mod", "edit", "-replace", "github.com/ledgerwatch/erigon="+filepath.Join(pwd, "..", "..", "..")) // Repo root replacer.Dir = pkg if out, err := replacer.CombinedOutput(); err != nil { @@ -1859,8 +1867,8 @@ func TestGolangBindings(t *testing.T) { if out, err := tidier.CombinedOutput(); err != nil { t.Fatalf("failed to tidy Go module file: %v\n%s", err, out) } - // Test the entire package and report any failures - cmd := exec.Command(gocmd, "test", "-v", "-count", "1", "-tags", "mdbx") + //Test the entire package and report any failures + cmd := exec.Command(gocmd, "test", "-v", "-count", "1") cmd.Dir = pkg if out, err := cmd.CombinedOutput(); err != nil { t.Fatalf("failed to run binding test: %v\n%s", err, out) diff --git a/go.mod b/go.mod index 4e215d5f05d..4ee6b8cc217 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/ledgerwatch/erigon go 1.19 require ( - github.com/ledgerwatch/erigon-lib v0.0.0-20230323051917-d7b01ea68f75 + github.com/ledgerwatch/erigon-lib v0.0.0-20230323062604-e15093d30e18 github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3 github.com/ledgerwatch/log/v3 v3.7.0 github.com/ledgerwatch/secp256k1 v1.0.0 diff --git a/go.sum b/go.sum index d7cb1706074..594175e7ba2 100644 --- a/go.sum +++ b/go.sum @@ -519,8 +519,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3PYPwICLl+/9oulQauOuETfgFvhBDffs0= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/ledgerwatch/erigon-lib v0.0.0-20230323051917-d7b01ea68f75 h1:RO73OYf0mwvbrRx9N4rjtQ/2rsYfa9n6/5FRO0VBhm4= -github.com/ledgerwatch/erigon-lib v0.0.0-20230323051917-d7b01ea68f75/go.mod h1:dagOLJlpxlMcQX4a2KIdzyCBIMtk6+ccqikNQf2uDwA= +github.com/ledgerwatch/erigon-lib v0.0.0-20230323062604-e15093d30e18 h1:deIunwmAyt1KbzcFEOD5MwzThJFPO2E+2kDpaSAJDFI= +github.com/ledgerwatch/erigon-lib v0.0.0-20230323062604-e15093d30e18/go.mod h1:dagOLJlpxlMcQX4a2KIdzyCBIMtk6+ccqikNQf2uDwA= github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3 h1:tfzawK1gIIgRjVZeANXOr0Ziu+kqCIBuKMe0TXfl5Aw= github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo= github.com/ledgerwatch/log/v3 v3.7.0 h1:aFPEZdwZx4jzA3+/Pf8wNDN5tCI0cIolq/kfvgcM+og=