Skip to content

Commit fa85402

Browse files
Use golang version matrix
This change allows testing goengine for both golang 1.17 and 1.18
1 parent 8909e7a commit fa85402

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/testing.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ jobs:
1616
- name: golangci-lint
1717
uses: golangci/golangci-lint-action@v2
1818

19-
test:
20-
name: Test
19+
go-test:
20+
name: Go ${{ matrix.go }} Test
2121
runs-on: ubuntu-latest
2222
needs: [ lint ]
2323

24+
strategy:
25+
matrix:
26+
go: [ '~1.17', '~1.18' ]
27+
2428
services:
2529
postgres:
2630
image: postgres:10
@@ -40,7 +44,7 @@ jobs:
4044
- name: Set up Go
4145
uses: actions/setup-go@v2
4246
with:
43-
go-version: ^1.17
47+
go-version: ${{ matrix.go }}
4448
- name: Check out code
4549
uses: actions/checkout@v2
4650
- name: Run unit tests
@@ -51,3 +55,12 @@ jobs:
5155
run: make test-integration
5256
env:
5357
POSTGRES_DSN: postgres://goengine:goengine@localhost:${{ job.services.postgres.ports[5432] }}/goengine?sslmode=disable
58+
59+
test:
60+
name: Test
61+
runs-on: ubuntu-latest
62+
needs: [ go-test ]
63+
64+
steps:
65+
- name: Done
66+
run: echo "All Golang versions tests are Green!"

0 commit comments

Comments
 (0)