diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b2a6bea21..bffed8f453 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -239,6 +239,27 @@ jobs: exit $LASTEXITCODE } + - name: Validate go generate in test + shell: powershell + working-directory: test + run: | + Write-Output "::group::go generate" + go generate -x .\... + Write-Output "::endgroup::" + if ($LASTEXITCODE -ne 0) { + Write-Output "::error title=Go Generate::Error running go generate." + exit $LASTEXITCODE + } + + git add --all --intent-to-add . + Write-Output "::group::git diff" + git diff --stat --exit-code + Write-Output "::endgroup::" + if ($LASTEXITCODE -ne 0) { + Write-Output "::error ::Generated files are not up to date. Please run ``go generate .\...`` from within ``./test``." + exit $LASTEXITCODE + } + test-linux: needs: [lint, protos, verify-vendor, go-gen] runs-on: ubuntu-latest diff --git a/test/go.mod b/test/go.mod index 69b7396cb4..d1f6e5818e 100644 --- a/test/go.mod +++ b/test/go.mod @@ -12,6 +12,7 @@ require ( github.com/containerd/ttrpc v1.2.2 github.com/containerd/typeurl/v2 v2.1.1 github.com/google/go-containerregistry v0.17.0 + github.com/josephspurrier/goversioninfo v1.4.0 github.com/kevpar/cri v1.11.1-0.20220302210600-4c5c347230b2 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0-rc3 @@ -36,6 +37,7 @@ require ( github.com/Microsoft/didx509go v0.0.2 // indirect github.com/OneOfOne/xxhash v1.2.8 // indirect github.com/agnivade/levenshtein v1.0.1 // indirect + github.com/akavel/rsrc v0.10.2 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/container-orchestrated-devices/container-device-interface v0.5.4 // indirect github.com/containerd/console v1.0.3 // indirect diff --git a/test/go.sum b/test/go.sum index cd611efbe5..0264496e3c 100644 --- a/test/go.sum +++ b/test/go.sum @@ -822,6 +822,7 @@ github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= +github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw= github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -1469,6 +1470,7 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josephspurrier/goversioninfo v1.4.0 h1:Puhl12NSHUSALHSuzYwPYQkqa2E1+7SrtAPJorKK0C8= github.com/josephspurrier/goversioninfo v1.4.0/go.mod h1:JWzv5rKQr+MmW+LvM412ToT/IkYDZjaclF2pKDss8IY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= diff --git a/test/pkg/manifest/manifest.xml b/test/pkg/manifest/manifest.xml index acf4843ede..229e61e1fd 100644 --- a/test/pkg/manifest/manifest.xml +++ b/test/pkg/manifest/manifest.xml @@ -1,6 +1,6 @@ - containerd-shim-runhcs-v1 + hcsshim-test diff --git a/test/pkg/manifest/resource_windows_386.syso b/test/pkg/manifest/resource_windows_386.syso index c4ee2aa22a..497a64fa82 100644 Binary files a/test/pkg/manifest/resource_windows_386.syso and b/test/pkg/manifest/resource_windows_386.syso differ diff --git a/test/pkg/manifest/resource_windows_amd64.syso b/test/pkg/manifest/resource_windows_amd64.syso index 5e5c9c9cee..05db0b5231 100644 Binary files a/test/pkg/manifest/resource_windows_amd64.syso and b/test/pkg/manifest/resource_windows_amd64.syso differ diff --git a/test/pkg/manifest/resource_windows_arm.syso b/test/pkg/manifest/resource_windows_arm.syso index 1210c4eb8f..c1c2165f3a 100644 Binary files a/test/pkg/manifest/resource_windows_arm.syso and b/test/pkg/manifest/resource_windows_arm.syso differ diff --git a/test/pkg/manifest/resource_windows_arm64.syso b/test/pkg/manifest/resource_windows_arm64.syso index 83004b1b5d..eb5df81f12 100644 Binary files a/test/pkg/manifest/resource_windows_arm64.syso and b/test/pkg/manifest/resource_windows_arm64.syso differ diff --git a/test/tools.go b/test/tools.go new file mode 100644 index 0000000000..2604c63aeb --- /dev/null +++ b/test/tools.go @@ -0,0 +1,8 @@ +//go:build tools + +package tools + +import ( + // create syso files for manifesting + _ "github.com/josephspurrier/goversioninfo/cmd/goversioninfo" +)