From a66fa3dca20cf2fc498a33dfc158518320daa9d9 Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Thu, 30 Nov 2023 10:14:37 -0800 Subject: [PATCH] update tests.yml --- .github/workflows/tests.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7e80d5a9..0652174f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,7 @@ jobs: strategy: matrix: go: + - "1.21" - "1.20" - "1.19" - "1.18" @@ -24,18 +25,18 @@ jobs: uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - + - run: go version - name: install lambda runtime interface emulator run: curl -L -o /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie-x86_64 - - run: chmod +x /usr/local/bin/aws-lambda-rie + - run: chmod +x /usr/local/bin/aws-lambda-rie - name: Check out code into the Go module directory uses: actions/checkout@v3 - - name: modhack - run: if [[ ${{ matrix.go }} < "1.15" ]]; then sed -i.bak 's/.*retract .*//' go.mod; fi + - name: Edit the go.mod file to allow tests to run for versions of go before 1.16 + run: if [[ ${{ matrix.go }} < "1.16" ]]; then sed -i.bak 's/^.*retract.*$//' go.mod; fi - name: go test run: go test -v -race ./... @@ -43,15 +44,19 @@ jobs: coverage: name: run tests with coverage runs-on: ubuntu-latest + strategy: + matrix: + go: + - "1.21" steps: - - name: Set up Go + - name: Set up Go ${{ matrix.go }} uses: actions/setup-go@v3 with: - go-version: "1.20" + go-version: ${{ matrix.go }} - name: install lambda runtime interface emulator run: curl -L -o /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie-x86_64 - - run: chmod +x /usr/local/bin/aws-lambda-rie + - run: chmod +x /usr/local/bin/aws-lambda-rie - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -65,5 +70,5 @@ jobs: file: ./coverage.txt env_vars: GO env: - GO: "1.20" + GO: ${{ matrix.go }}