From 167ffb42e3c1ce5b7d6d10166146382156b51400 Mon Sep 17 00:00:00 2001 From: Austin Vazquez Date: Thu, 16 Mar 2023 16:12:34 +0000 Subject: [PATCH] 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 --- .github/workflows/build-pr.yml | 12 ++++++++---- .github/workflows/build.yml | 12 ++++++++---- Makefile | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index e27ed59d3..2b4e96091 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -8,14 +8,19 @@ on: jobs: run: runs-on: ubuntu-latest + + strategy: + matrix: + go: [1.19.x, 1.20.x] + steps: - name: checkout source code - uses: actions/checkout@master + uses: actions/checkout@v3 - name: setup go environment - uses: actions/setup-go@v1 + uses: actions/setup-go@v4 with: - go-version: '1.17.2' + go-version: ${{ matrix.go }} - name: create go.mod run: | @@ -32,7 +37,6 @@ jobs: - name: run tests run: | - export PATH="$(go env GOPATH)/bin:${PATH}" set -x make install.tools diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb29bd872..83354d8d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,14 +8,19 @@ on: jobs: run: runs-on: ubuntu-latest + + strategy: + matrix: + go: [1.19.x, 1.20.x] + steps: - name: checkout source code - uses: actions/checkout@master + uses: actions/checkout@v3 - name: setup go environment - uses: actions/setup-go@v1 + uses: actions/setup-go@v4 with: - go-version: '1.17.2' + go-version: ${{ matrix.go }} - name: create go.mod run: | @@ -32,7 +37,6 @@ jobs: - name: run tests run: | - export PATH="$(go env GOPATH)/bin:${PATH}" set -x make install.tools diff --git a/Makefile b/Makefile index 9fb877de3..78cbc31c2 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ endif install.tools: .install.gitvalidation .install.gitvalidation: - go get -u github.com/vbatts/git-validation + go install github.com/vbatts/git-validation@v1.2.0 clean: rm -rf $(OUTPUT_DIRNAME) *~