Skip to content

Commit

Permalink
Bump Go and Ginkgo version
Browse files Browse the repository at this point in the history
Bump to Go 1.18.

Change to Ginkgo version 2.
  • Loading branch information
HeavyWombat committed Jun 4, 2022
1 parent 6ebda65 commit 7cbcf25
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 1,468 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
go-version: 1.18.x

- name: Check out code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
go-version: 1.18.x

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
40 changes: 23 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,49 @@ goos := $(shell uname | tr '[:upper:]' '[:lower:]')
goarch := $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')

.PHONY: all
all: clean verify build
all: verify build

.PHONY: clean
clean:
@GO111MODULE=on go clean -cache $(shell go list ./...)
@go clean -cache $(shell go list ./...)
@rm -rf dist

.PHONY: verify
verify:
@GO111MODULE=on go mod download
@GO111MODULE=on go mod verify
@go mod download
@go mod verify

.PHONY: test
test: $(sources)
@GO111MODULE=on ginkgo \
@ginkgo \
-r \
-randomizeAllSpecs \
-randomizeSuites \
-failOnPending \
-trace \
-race \
-nodes=4 \
-compilers=2 \
-cover
-p \
--randomize-all \
--randomize-suites \
--fail-on-pending \
--nodes=4 \
--compilers=2 \
--slow-spec-threshold=2m \
--race \
--trace \
--cover

.PHONY: build
build: $(sources)
@go build ./...

.PHONY: install
install: $(sources)
@GO111MODULE=on CGO_ENABLED=0 GOOS=$(goos) GOARCH=$(goarch) go build \
-tags netgo \
@CGO_ENABLED=0 GOOS=$(goos) GOARCH=$(goarch) go build \
-trimpath \
-ldflags='-s -w -extldflags "-static" -X github.com/homeport/build-load/internal/cmd.version=$(version)' \
-o /usr/local/bin/build-load \
cmd/build-load/main.go

.PHONY: install-user
install-user: $(sources)
@GO111MODULE=on CGO_ENABLED=0 GOOS=$(goos) GOARCH=$(goarch) go build \
-tags netgo \
@CGO_ENABLED=0 GOOS=$(goos) GOARCH=$(goarch) go build \
-trimpath \
-ldflags='-s -w -extldflags "-static" -X github.com/homeport/build-load/internal/cmd.version=$(version)' \
-o "${HOME}/bin/build-load" \
cmd/build-load/main.go
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/homeport/build-load

go 1.17
go 1.18

require (
github.com/golang-jwt/jwt/v4 v4.4.1
Expand All @@ -9,7 +9,7 @@ require (
github.com/gonvenience/text v1.0.7
github.com/gonvenience/wrap v1.1.2
github.com/lucasb-eyer/go-colorful v1.2.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.1.4
github.com/onsi/gomega v1.19.0
github.com/shipwright-io/build v0.10.0
github.com/spf13/cobra v1.4.0
Expand Down Expand Up @@ -65,7 +65,6 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand Down Expand Up @@ -98,7 +97,6 @@ require (
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.60.1-0.20220317184644-43cc75f9ae89 // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
Expand Down
1,441 changes: 0 additions & 1,441 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions internal/load/load_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package load_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand All @@ -33,5 +33,5 @@ const (

func TestLoad(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "pkg/load")
RunSpecs(t, "Load Suite")
}
2 changes: 1 addition & 1 deletion internal/load/math_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package load_test
import (
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

. "github.com/homeport/build-load/internal/load"
Expand Down
2 changes: 1 addition & 1 deletion internal/load/reports_csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"bytes"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

. "github.com/homeport/build-load/internal/load"
Expand Down

0 comments on commit 7cbcf25

Please sign in to comment.