Skip to content

Commit

Permalink
NR-100933 chore: upgrade to Go 1.20 (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavSanchez committed Mar 27, 2023
1 parent 39e3917 commit 9700c58
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 20 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/push_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
env:
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
ORIGINAL_REPO_NAME: "newrelic/nri-flex"
GO_VERSION: '1.19'

jobs:

Expand All @@ -29,9 +28,9 @@ jobs:
- name: checkout code
uses: actions/checkout@v2
- name: Install go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
- name: Run unit tests
run: make ci/test
- name: Convert coverage.out to lcov.info
Expand Down Expand Up @@ -75,17 +74,17 @@ jobs:
test-windows:
strategy:
matrix:
go: [ '1.19' ]
go: [ '1.20' ]
os: [ windows-2019 ]
name: Run unit and integration tests in ${{matrix.os}} with go ${{matrix.go}}
runs-on: ${{matrix.os}}
steps:
- name: checkout
uses: actions/checkout@v2
- name: install go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{matrix.go}}
go-version-file: 'go.mod'
- name: run unit tests
# we don't have 'make' on windows.
run: |
Expand Down Expand Up @@ -120,9 +119,9 @@ jobs:
username: ${{ secrets.OHAI_DOCKER_HUB_ID }}
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }}
- name: Install go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
- name: Run e2e tests
run: make test-e2e

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- 'v*'

env:
GO_VERSION: '1.19'
TAG: ${{ github.event.release.tag_name }}
IS_RELEASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # needed for goreleaser
Expand All @@ -26,9 +25,9 @@ jobs:
- name: checkout code
uses: actions/checkout@v2
- name: Install go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
- name: Run unit tests
run: make ci/test
- name: Convert coverage.out to lcov.info
Expand Down Expand Up @@ -72,17 +71,17 @@ jobs:
test-windows:
strategy:
matrix:
go: [ '1.19' ]
go: [ '1.20' ]
os: [ windows-2019 ]
name: Run unit and integration tests in ${{matrix.os}} with go ${{matrix.go}}
runs-on: ${{matrix.os}}
steps:
- name: checkout
uses: actions/checkout@v2
- name: install go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{matrix.go}}
go-version-file: 'go.mod'
- name: run unit tests
# we don't have 'make' on windows.
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SRCDIR ?= .
BUILD_DIR ?= $(CURDIR)/bin
COVERAGE_FILE ?= coverage.out

GO_VERSION ?= 1.19
GO_VERSION ?= 1.20
GO_CMD ?= go
GODOC ?= godocdown

Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.19
ARG GO_VERSION=1.20

FROM golang:$GO_VERSION

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
golang:
image: golang:1.13.6-stretch
image: golang:1.20.2-buster
volumes:
- .:/go/src/github.com/newrelic/nri-flex
working_dir: /go/src/github.com/newrelic/nri-flex
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/newrelic/nri-flex

go 1.19
go 1.20

require (
github.com/Knetic/govaluate v3.0.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker-compose-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
golang:
image: golang:1.13.6-stretch
image: golang:1.20.2-buster
volumes:
- ../:/go/src/github.com/newrelic/nri-flex
working_dir: /go/src/github.com/newrelic/nri-flex
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/newrelic/nri-flex/tools

go 1.19
go 1.20

require (
github.com/AlekSi/gocov-xml v0.0.0-20190121064608-3a14fb1c4737
Expand Down

0 comments on commit 9700c58

Please sign in to comment.