From 0906a62f29ac8dfa0d16a2d1b5b6213a048943cd Mon Sep 17 00:00:00 2001 From: Jordan Mitchell Barrett <90195985+barrettj12@users.noreply.github.com> Date: Wed, 2 Aug 2023 21:59:31 +1200 Subject: [PATCH] ci: run unit tests on go 1.20 only; build using version from go.mod Co-authored-by: Jon Seager --- .github/workflows/binaries.yml | 2 +- .github/workflows/tests.yml | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 9cdb4fb0..bde1060d 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -27,7 +27,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: stable # latest stable version of Go + go-version-file: "go.mod" - name: Build binary and create archive id: build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3b47e444..e5fb73a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,15 +13,14 @@ jobs: strategy: fail-fast: false matrix: - go: ['1.20', '1.19', '1.18', '1.17'] + go: ['1.20'] name: Go ${{ matrix.go }} - steps: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} @@ -34,14 +33,13 @@ jobs: runs-on: ubuntu-latest name: Root Tests - steps: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version: ${{ matrix.go }} - name: Test run: | @@ -57,12 +55,11 @@ jobs: runs-on: ubuntu-latest name: Format check - steps: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod'