Skip to content

Commit 7d8af1e

Browse files
author
Michael Gasch
committed
chore: Update CI to Go 1.18
Update Go versions used (current and current-1) in various places (workflows and Docker images). Update to current Ubuntu runner 20.04. run go mod tidy to clean up/ correctly order Go deps. Note: go.mod version not bumped to 1.18 to avoid issues when running with Go 1.17. Closes: #2785 Signed-off-by: Michael Gasch <[email protected]>
1 parent c294107 commit 7d8af1e

16 files changed

+605
-232
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
analyze:
2525
name: Analyze
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-20.04
2727
permissions:
2828
actions: read
2929
contents: read

.github/workflows/govmomi-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030
jobs:
3131
artifacts:
3232
name: Build Snapshot Release (no upload)
33-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-20.04
3434
timeout-minutes: 15
3535

3636
steps:
@@ -40,9 +40,9 @@ jobs:
4040
fetch-depth: 0 # for CHANGELOG
4141

4242
- name: Set up Go
43-
uses: actions/setup-go@v2
43+
uses: actions/setup-go@v3
4444
with:
45-
go-version: 1.17
45+
go-version: 1.18
4646

4747
- name: Create CHANGELOG
4848
env:

.github/workflows/govmomi-check-wip.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121

2222
jobs:
2323
wip:
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-20.04
2525
steps:
2626
- name: Check WIP in PR Title
2727
uses: embano1/wip@v1

.github/workflows/govmomi-go-lint.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525

2626
lint:
2727
name: Lint Files
28-
runs-on: ubuntu-latest
28+
runs-on: ubuntu-20.04
2929
timeout-minutes: 10
3030

3131
steps:
32-
- name: Set up Go 1.17.x
33-
uses: actions/setup-go@v2
32+
- name: Set up Go
33+
uses: actions/setup-go@v3
3434
with:
35-
go-version: 1.17.x
35+
go-version: 1.18
3636
id: go
3737

3838
- name: Check out code

.github/workflows/govmomi-go-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
name: Run Unit Tests
2727
strategy:
2828
matrix:
29-
go-version: ["1.16", "1.17"]
30-
platform: ["ubuntu-latest"]
29+
go-version: ["1.17", "1.18"]
30+
platform: ["ubuntu-20.04"]
3131

3232
runs-on: ${{ matrix.platform }}
3333
timeout-minutes: 10
3434

3535
steps:
3636
- name: Set up Go ${{ matrix.go-version }}
37-
uses: actions/setup-go@v2
37+
uses: actions/setup-go@v3
3838
with:
3939
go-version: ${{ matrix.go-version }}
4040
id: go

.github/workflows/govmomi-govc-tests.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626
name: Run govc Tests
2727
strategy:
2828
matrix:
29-
go-version: ["1.16", "1.17"]
30-
platform: ["ubuntu-18.04"]
29+
go-version: ["1.17", "1.18"]
30+
platform: ["ubuntu-20.04"]
3131
cmd: ["govc-test"]
3232
experimental: [false]
3333
timeout: [10]
3434
include:
35-
- go-version: "1.16"
36-
platform: "ubuntu-18.04"
35+
- go-version: "1.18"
36+
platform: "ubuntu-20.04"
3737
cmd: "govc-test-sso"
3838
experimental: true
3939
timeout: 3
40-
- go-version: "1.16"
41-
platform: "ubuntu-18.04"
40+
- go-version: "1.18"
41+
platform: "ubuntu-20.04"
4242
cmd: "govc-test-sso-assert-cert"
4343
experimental: true
4444
timeout: 3
@@ -49,7 +49,7 @@ jobs:
4949

5050
steps:
5151
- name: Set up Go ${{ matrix.go-version }}
52-
uses: actions/setup-go@v2
52+
uses: actions/setup-go@v3
5353
with:
5454
go-version: ${{ matrix.go-version }}
5555
id: go
@@ -58,19 +58,22 @@ jobs:
5858
uses: actions/checkout@v2
5959

6060
- name: Run ${{ matrix.cmd }}
61-
run: make ${{ matrix.cmd }}
61+
run: |
62+
# hack: https://github.com/actions/setup-go/issues/107#issuecomment-956161446
63+
cp -f `which go` /usr/bin/go
64+
make ${{ matrix.cmd }}
6265
6366
govc-docs:
6467
name: Verify govc docs are up2date
6568
strategy:
6669
matrix:
6770
go-version: ["1.17"]
68-
platform: ["ubuntu-18.04"]
71+
platform: ["ubuntu-20.04"]
6972
runs-on: ${{ matrix.platform }}
7073
timeout-minutes: 3
7174
steps:
7275
- name: Set up Go ${{ matrix.go-version }}
73-
uses: actions/setup-go@v2
76+
uses: actions/setup-go@v3
7477
with:
7578
go-version: ${{ matrix.go-version }}
7679
id: go

.github/workflows/govmomi-release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
jobs:
2323
release:
2424
name: Create Release
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-20.04
2626
timeout-minutes: 60
2727

2828
steps:
@@ -35,9 +35,9 @@ jobs:
3535
fetch-depth: 0 # for CHANGELOG
3636

3737
- name: Set up Go
38-
uses: actions/setup-go@v2
38+
uses: actions/setup-go@v3
3939
with:
40-
go-version: 1.17
40+
go-version: 1.18
4141

4242
- name: Create RELEASE CHANGELOG
4343
env:
@@ -68,7 +68,7 @@ jobs:
6868
pull-request:
6969
needs: release
7070
name: Create CHANGELOG.md PR
71-
runs-on: ubuntu-latest
71+
runs-on: ubuntu-20.04
7272
continue-on-error: true
7373

7474
steps:

.github/workflows/govmomi-stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
stale:
23-
runs-on: "ubuntu-latest"
23+
runs-on: ubuntu-20.04
2424

2525
steps:
2626
- uses: "actions/stale@v3"

.github/workflows/issue-greeting.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
greeting:
99
name: Send Greeting
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-20.04
1111
# only send message to users not (yet) associated with repo
1212
# https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
1313
if: github.event.issue.author_association == 'NONE'

.github/workflows/verify-docker-login.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
jobs:
2323
login:
2424
name: Verify Docker Login
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-20.04
2626
timeout-minutes: 3
2727

2828
steps:

0 commit comments

Comments
 (0)