1
0

Use a test matrix with the last three stable Go versions (#96)

This commit is contained in:
Markus Wüstenberg 2022-03-21 12:05:17 +01:00 committed by GitHub
parent 0001b1d609
commit 540b2a3491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,26 +7,33 @@ on:
branches: [ master ]
jobs:
build:
name: Build
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16", "1.17", "1.18" ]
steps:
- name: Check out
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ${{ matrix.go }}
check-latest: true
- name: Build
run: go build -v ./...
- name: Test
if: ${{ matrix.go != '1.16' }}
run: go test -v -coverprofile=coverage.txt -shuffle on ./...
- name: Test
if: ${{ matrix.go == '1.16' }}
run: go test -v -coverprofile=coverage.txt ./...
- name: Coverage
uses: codecov/codecov-action@v1.0.13
uses: codecov/codecov-action@v2
lint:
name: Lint