Skip to content

Commit

Permalink
chore(engine): update to go1.18 (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Brumhard <tobias.brumhard@mail.schwarz>
  • Loading branch information
brumhard committed Mar 28, 2022
1 parent d833ae5 commit 200218a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.18.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
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@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # tag=v3.0.0
with:
go-version: 1.17
go-version: 1.18
- uses: actions/cache@4b0cf6cc4619e737324ddfcec08fff2413359514 # tag=v3.0.0
with:
path: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL=/bin/bash -e -o pipefail
PWD = $(shell pwd)

# constants
GOLANGCI_VERSION = 1.42.1
GOLANGCI_VERSION = 1.45.2

all: git-hooks generate ## Initializes all tools and files

Expand Down Expand Up @@ -49,7 +49,7 @@ out/lint.xml: $(GOLANGCI_LINT) out download
$(GOLANGCI_LINT) run ./... --out-format checkstyle | tee "$(@)"

test: ## Runs all tests
go test ./...
@go test ./...

coverage: out/report.json ## Displays coverage per func on cli
go tool cover -func=out/cover.out
Expand Down
2 changes: 1 addition & 1 deletion _template/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pool:
vmImage: ubuntu-latest
variables:
- name: goVersion
value: 1.17
value: 1.18

stages:
- stage: test
Expand Down
2 changes: 1 addition & 1 deletion _template/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.18.x]
os: [ubuntu-latest]
runs-on: {{`${{ matrix.os }}`}}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/schwarzit/go-template

go 1.17
go 1.18

require (
github.com/Masterminds/semver/v3 v3.1.1
Expand Down
4 changes: 3 additions & 1 deletion pkg/gocli/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"
"testing"

"github.com/Masterminds/semver/v3"
"github.com/schwarzit/go-template/pkg/gocli"
"github.com/stretchr/testify/require"
)
Expand All @@ -13,5 +14,6 @@ func Test_Semver(t *testing.T) {
version, err := gocli.Semver()
require.NoError(t, err)
// check that the version this test was build with matches the go version provided by goexec.Semver.
require.Equal(t, strings.TrimPrefix(runtime.Version(), "go"), version.String())
runtimeVersion := semver.MustParse(strings.TrimPrefix(runtime.Version(), "go"))
require.True(t, version.Equal(runtimeVersion))
}

0 comments on commit 200218a

Please sign in to comment.