Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a5c9eb

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 938fd06 commit 6a5c9eb

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.github/workflows/build-pr.yml

Lines changed: 8 additions & 4 deletions
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: run golangci-lint
2126
uses: golangci/golangci-lint-action@v3
@@ -25,7 +30,6 @@ jobs:
2530

2631
- name: run tests
2732
run: |
28-
export PATH="$(go env GOPATH)/bin:${PATH}"
2933
set -x
3034
make install.tools
3135

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
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: run golangci-lint
2126
uses: golangci/golangci-lint-action@v3
@@ -25,7 +30,6 @@ jobs:
2530

2631
- name: run tests
2732
run: |
28-
export PATH="$(go env GOPATH)/bin:${PATH}"
2933
set -x
3034
make install.tools
3135

Makefile

Lines changed: 1 addition & 1 deletion
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)