Skip to content

Commit 167ffb4

Browse files
committed
Add Go 1.20 support to CI
Adds a Go compiler matrix to CI for testing of latest Go versions. Updates and pins to major version GitHub actions packages. Signed-off-by: Austin Vazquez <[email protected]>
1 parent 15d2a5a commit 167ffb4

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.github/workflows/build-pr.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@ on:
88
jobs:
99
run:
1010
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
go: [1.19.x, 1.20.x]
15+
1116
steps:
1217
- name: checkout source code
13-
uses: actions/checkout@master
18+
uses: actions/checkout@v3
1419

1520
- name: setup go environment
16-
uses: actions/setup-go@v1
21+
uses: actions/setup-go@v4
1722
with:
18-
go-version: '1.17.2'
23+
go-version: ${{ matrix.go }}
1924

2025
- name: create go.mod
2126
run: |
@@ -32,7 +37,6 @@ jobs:
3237

3338
- name: run tests
3439
run: |
35-
export PATH="$(go env GOPATH)/bin:${PATH}"
3640
set -x
3741
make install.tools
3842

.github/workflows/build.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@ on:
88
jobs:
99
run:
1010
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
go: [1.19.x, 1.20.x]
15+
1116
steps:
1217
- name: checkout source code
13-
uses: actions/checkout@master
18+
uses: actions/checkout@v3
1419

1520
- name: setup go environment
16-
uses: actions/setup-go@v1
21+
uses: actions/setup-go@v4
1722
with:
18-
go-version: '1.17.2'
23+
go-version: ${{ matrix.go }}
1924

2025
- name: create go.mod
2126
run: |
@@ -32,7 +37,6 @@ jobs:
3237

3338
- name: run tests
3439
run: |
35-
export PATH="$(go env GOPATH)/bin:${PATH}"
3640
set -x
3741
make install.tools
3842

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ endif
7373
install.tools: .install.gitvalidation
7474

7575
.install.gitvalidation:
76-
go get -u github.com/vbatts/git-validation
76+
go install github.com/vbatts/git-validation@v1.2.0
7777

7878
clean:
7979
rm -rf $(OUTPUT_DIRNAME) *~

0 commit comments

Comments
 (0)