From 99e3ae07e62a10bf9209b85a3590fcda53e89a28 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Wed, 5 Jul 2023 15:28:13 +0200 Subject: [PATCH] Add tests for old Go versions Test old Go versions all the way back to 1.17. * Bump actions/setup-go to v4. Signed-off-by: SuperQ --- .github/workflows/main.yml | 22 ++++++++++++++++++++-- go.mod | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 08e548c07..0a6140e6c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,14 +6,32 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go_version: ["1.20", "1.19"] + go_version: + - "1.19" + - "1.20" steps: - uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v3.2.0 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go_version }} - run: ./.ci.gogenerate.sh - run: ./.ci.gofmt.sh - run: ./.ci.govet.sh - run: go test -v -race ./... + test: + runs-on: ubuntu-latest + strategy: + matrix: + go_version: + - "1.17" + - "1.18" + - "1.19" + - "1.20" + steps: + - uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go_version }} + - run: go test -v -race ./... diff --git a/go.mod b/go.mod index 60d69a8ea..d3c4d723b 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/stretchr/testify // This should match the minimum supported version that is tested in // .github/workflows/main.yml -go 1.19 +go 1.17 require ( github.com/davecgh/go-spew v1.1.1