Use a test matrix with the last three stable Go versions (#96)
This commit is contained in:
parent
0001b1d609
commit
540b2a3491
35
.github/workflows/go.yml
vendored
35
.github/workflows/go.yml
vendored
@ -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
|
||||
with:
|
||||
go-version: ^1.17
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
check-latest: true
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v -coverprofile=coverage.txt -shuffle on ./...
|
||||
- name: Test
|
||||
if: ${{ matrix.go != '1.16' }}
|
||||
run: go test -v -coverprofile=coverage.txt -shuffle on ./...
|
||||
|
||||
- name: Coverage
|
||||
uses: codecov/codecov-action@v1.0.13
|
||||
- name: Test
|
||||
if: ${{ matrix.go == '1.16' }}
|
||||
run: go test -v -coverprofile=coverage.txt ./...
|
||||
|
||||
- name: Coverage
|
||||
uses: codecov/codecov-action@v2
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
|
Loading…
Reference in New Issue
Block a user