Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go 1.20 #1740

Merged
merged 4 commits into from
May 12, 2023
Merged

go 1.20 #1740

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
- name: Set up go env for Unix
if: runner.os != 'Windows'
run: |
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
- name: Build
run: |
[[ $GITHUB_REF =~ ^refs\/heads\/release/(.*)$ ]] && version=${BASH_REMATCH[1]} || version=0.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
- name: Set up go env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ install-golangci-lint:

## mod-tidy: Tidy Go modules
mod-tidy:
$(GOCMD) mod tidy -compat=1.19
cd tools && $(GOCMD) mod tidy -compat=1.19
$(GOCMD) mod tidy -compat=1.20
cd tools && $(GOCMD) mod tidy -compat=1.20

## tidy: Tidy modules and format the code
tidy: mod-tidy format
Expand All @@ -188,4 +188,4 @@ help: Makefile
@awk -F ':|##' '/^[^\.%\t][^\t]*:.*##/{printf " \033[36m%-20s\033[0m %s\n", $$1, $$NF}' $(MAKEFILE_LIST) | sort
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

.PHONY: clean build format imports lint test unit acceptance prepare-for-pr verify verify-format benchmark
.PHONY: clean build format imports lint test unit acceptance prepare-for-pr verify verify-format benchmark
1 change: 0 additions & 1 deletion acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func TestAcceptance(t *testing.T) {
var err error

h.RequireDocker(t)
rand.Seed(time.Now().UTC().UnixNano())

assert := h.NewAssertionManager(t)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
)

go 1.19
go 1.20
2 changes: 0 additions & 2 deletions internal/build/container_ops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import (

// TestContainerOperations are integration tests for the container operations against a docker daemon
func TestContainerOperations(t *testing.T) {
rand.Seed(time.Now().UTC().UnixNano())

color.Disable(true)
defer color.Disable(false)

Expand Down
2 changes: 0 additions & 2 deletions internal/build/lifecycle_execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ import (

// TestLifecycleExecution are unit tests that test each possible phase to ensure they are executed with the proper parameters
func TestLifecycleExecution(t *testing.T) {
rand.Seed(time.Now().UTC().UnixNano())

color.Disable(true)
defer color.Disable(false)

Expand Down
4 changes: 0 additions & 4 deletions internal/build/lifecycle_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ type Termui interface {
ReadLayers(reader io.ReadCloser) error
}

func init() {
rand.Seed(time.Now().UTC().UnixNano())
}

type LifecycleOptions struct {
AppPath string
Image name.Reference
Expand Down
2 changes: 0 additions & 2 deletions internal/build/phase_config_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
)

func TestPhaseConfigProvider(t *testing.T) {
rand.Seed(time.Now().UTC().UnixNano())

color.Disable(true)
defer color.Disable(false)

Expand Down
2 changes: 0 additions & 2 deletions internal/build/phase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ var (

// TestPhase is a integration test suite to ensure that the phase options are propagated to the container.
func TestPhase(t *testing.T) {
rand.Seed(time.Now().UTC().UnixNano())

color.Disable(true)
defer color.Disable(false)

Expand Down
1 change: 0 additions & 1 deletion pkg/archive/archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
func TestArchive(t *testing.T) {
color.Disable(true)
defer color.Disable(false)
rand.Seed(time.Now().UTC().UnixNano())
spec.Run(t, "Archive", testArchive, spec.Sequential(), spec.Report(report.Terminal{}))
}

Expand Down
1 change: 0 additions & 1 deletion pkg/archive/tar_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
func TestTarBuilder(t *testing.T) {
color.Disable(true)
defer color.Disable(false)
rand.Seed(time.Now().UTC().UnixNano())
spec.Run(t, "TarBuilder", testTarBuilder, spec.Sequential(), spec.Report(report.Terminal{}))
}

Expand Down
1 change: 0 additions & 1 deletion pkg/cache/image_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func TestImageCache(t *testing.T) {
h.RequireDocker(t)
color.Disable(true)
defer color.Disable(false)
rand.Seed(time.Now().UTC().UnixNano())

spec.Run(t, "ImageCache", testImageCache, spec.Parallel(), spec.Report(report.Terminal{}))
}
Expand Down
1 change: 0 additions & 1 deletion pkg/cache/volume_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func TestVolumeCache(t *testing.T) {
h.RequireDocker(t)
color.Disable(true)
defer color.Disable(false)
rand.Seed(time.Now().UTC().UnixNano())

spec.Run(t, "VolumeCache", testCache, spec.Parallel(), spec.Report(report.Terminal{}))
}
Expand Down
1 change: 0 additions & 1 deletion pkg/client/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import (
func TestBuild(t *testing.T) {
color.Disable(true)
defer color.Disable(false)
rand.Seed(time.Now().UTC().UnixNano())
spec.Run(t, "build", testBuild, spec.Report(report.Terminal{}))
}

Expand Down
2 changes: 0 additions & 2 deletions pkg/image/fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ var docker client.CommonAPIClient
var registryConfig *h.TestRegistryConfig

func TestFetcher(t *testing.T) {
rand.Seed(time.Now().UTC().UnixNano())

color.Disable(true)
defer color.Disable(false)

Expand Down
1 change: 0 additions & 1 deletion pkg/project/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func TestProject(t *testing.T) {
h.RequireDocker(t)
color.Disable(true)
defer color.Disable(false)
rand.Seed(time.Now().UTC().UnixNano())

spec.Run(t, "Provider", testProject, spec.Parallel(), spec.Report(report.Terminal{}))
}
Expand Down