From a26915566f2703dd63bb5fce22795a32612572e5 Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Sat, 8 Apr 2023 10:42:09 -0700 Subject: [PATCH 1/5] Retract v1.39.0 in go.mod --- go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.mod b/go.mod index 456a8a6e..81f4d599 100644 --- a/go.mod +++ b/go.mod @@ -9,3 +9,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +retract v1.39.0 From c0a186707b31c5f9162a2b7a07d885c1fdd2d5bb Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Thu, 30 Nov 2023 10:08:24 -0800 Subject: [PATCH 2/5] try patching the go.mod file --- .github/workflows/tests.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da219999..de475c61 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: jobs: test: - name: run tests with code coverage + name: run tests runs-on: ubuntu-latest strategy: matrix: @@ -31,6 +31,28 @@ jobs: 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 + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: modhack + run: if [[ ${{ matrix.go }} < "1.16" ]]; then sed -i.bak 's/.*retract .*//' go.mod; fi + + - name: go test + run: go test -v -race ./... + + coverage: + name: run tests with coverage + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: "1.20" + + - 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 + - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -43,5 +65,5 @@ jobs: file: ./coverage.txt env_vars: GO env: - GO: ${{ matrix.go }} + GO: "1.20" From d2f63b852fbd9c96f36b3615193ffa65a3999ae5 Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Thu, 30 Nov 2023 10:10:29 -0800 Subject: [PATCH 3/5] 1.15? --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index de475c61..7e80d5a9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@v3 - name: modhack - run: if [[ ${{ matrix.go }} < "1.16" ]]; then sed -i.bak 's/.*retract .*//' go.mod; fi + run: if [[ ${{ matrix.go }} < "1.15" ]]; then sed -i.bak 's/.*retract .*//' go.mod; fi - name: go test run: go test -v -race ./... From a66fa3dca20cf2fc498a33dfc158518320daa9d9 Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Thu, 30 Nov 2023 10:14:37 -0800 Subject: [PATCH 4/5] 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 }} From dc615d17eabec63bac526916e71b7e2d0289e8bf Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Thu, 30 Nov 2023 10:16:30 -0800 Subject: [PATCH 5/5] update tests.yml --- .github/workflows/tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0652174f..784d704e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,12 @@ jobs: uses: actions/checkout@v3 - 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 + run: > + if [[ ${{ matrix.go }} < "1.16" ]]; then + sed -i.bak 's/^.*retract.*$//' go.mod + else + echo "no edit required" + fi - name: go test run: go test -v -race ./...