From cd0591e0e007cccf83e1b9aa3ee1628c89068bbf Mon Sep 17 00:00:00 2001 From: Tom <73077675+tmzane@users.noreply.github.com> Date: Wed, 28 Feb 2024 01:45:02 +0500 Subject: [PATCH] test: fix vendor for go1.22 (#81) --- .github/workflows/checks.yml | 1 + musttag_test.go | 2 +- testdata/src/{ => example.com}/custom/custom.go | 0 testdata/src/{ => example.com}/custom/go.mod | 0 testdata/src/go.mod | 2 +- testdata/src/go.work | 2 +- 6 files changed, 4 insertions(+), 3 deletions(-) rename testdata/src/{ => example.com}/custom/custom.go (100%) rename testdata/src/{ => example.com}/custom/go.mod (100%) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b81ecd8..30d008e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,6 +12,7 @@ jobs: uses: go-simpler/.github/.github/workflows/test.yml@main with: runs-on: '[ "ubuntu-latest", "windows-latest", "macos-latest" ]' + go-versions: '[ "stable" ]' lint: uses: go-simpler/.github/.github/workflows/lint.yml@main vuln: diff --git a/musttag_test.go b/musttag_test.go index 1f57fbd..930c03c 100644 --- a/musttag_test.go +++ b/musttag_test.go @@ -66,6 +66,6 @@ func setupModules(t *testing.T, testdata string) { err := os.Chdir(filepath.Join(testdata, "src")) assert.NoErr[F](t, err) - err = exec.Command("go", "mod", "vendor").Run() + err = exec.Command("go", "work", "vendor").Run() assert.NoErr[F](t, err) } diff --git a/testdata/src/custom/custom.go b/testdata/src/example.com/custom/custom.go similarity index 100% rename from testdata/src/custom/custom.go rename to testdata/src/example.com/custom/custom.go diff --git a/testdata/src/custom/go.mod b/testdata/src/example.com/custom/go.mod similarity index 100% rename from testdata/src/custom/go.mod rename to testdata/src/example.com/custom/go.mod diff --git a/testdata/src/go.mod b/testdata/src/go.mod index 6eb80d2..da0181c 100644 --- a/testdata/src/go.mod +++ b/testdata/src/go.mod @@ -10,4 +10,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 ) -replace example.com/custom => ./custom +replace example.com/custom => ./example.com/custom diff --git a/testdata/src/go.work b/testdata/src/go.work index 614654c..64db62f 100644 --- a/testdata/src/go.work +++ b/testdata/src/go.work @@ -2,5 +2,5 @@ go 1.20 use ( . - ./custom + ./example.com/custom )