File tree Expand file tree Collapse file tree 2 files changed +37
-3
lines changed Expand file tree Collapse file tree 2 files changed +37
-3
lines changed Original file line number Diff line number Diff line change 55
66jobs :
77 test :
8- name : run tests with code coverage
8+ name : run tests
99 runs-on : ubuntu-latest
1010 strategy :
1111 matrix :
1212 go :
13+ - " 1.21"
1314 - " 1.20"
1415 - " 1.19"
1516 - " 1.18"
@@ -24,12 +25,43 @@ jobs:
2425 uses : actions/setup-go@v3
2526 with :
2627 go-version : ${{ matrix.go }}
27-
28+
2829 - run : go version
2930
3031 - name : install lambda runtime interface emulator
3132 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
32- - run : chmod +x /usr/local/bin/aws-lambda-rie
33+ - run : chmod +x /usr/local/bin/aws-lambda-rie
34+
35+ - name : Check out code into the Go module directory
36+ uses : actions/checkout@v3
37+
38+ - name : Edit the go.mod file to allow tests to run for versions of go before 1.16
39+ run : >
40+ if [[ ${{ matrix.go }} < "1.16" ]]; then
41+ sed -i.bak 's/^.*retract.*$//' go.mod
42+ else
43+ echo "no edit required"
44+ fi
45+
46+ - name : go test
47+ run : go test -v -race ./...
48+
49+ coverage :
50+ name : run tests with coverage
51+ runs-on : ubuntu-latest
52+ strategy :
53+ matrix :
54+ go :
55+ - " 1.21"
56+ steps :
57+ - name : Set up Go ${{ matrix.go }}
58+ uses : actions/setup-go@v3
59+ with :
60+ go-version : ${{ matrix.go }}
61+
62+ - name : install lambda runtime interface emulator
63+ 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
64+ - run : chmod +x /usr/local/bin/aws-lambda-rie
3365
3466 - name : Check out code into the Go module directory
3567 uses : actions/checkout@v3
Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ require (
99 github.com/pmezard/go-difflib v1.0.0 // indirect
1010 gopkg.in/yaml.v3 v3.0.1 // indirect
1111)
12+
13+ retract v1.39.0
You can’t perform that action at this time.
0 commit comments