2021-11-04 15:04:38 +01:00
|
|
|
name: test
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, macos-latest, ubuntu-latest]
|
2022-12-18 14:49:46 +01:00
|
|
|
go: ["1.16", "1.17", "1.18", "1.19"]
|
2021-11-04 15:04:38 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2022-12-18 14:49:46 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v3
|
2021-11-04 15:04:38 +01:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
|
|
|
|
- run: go generate ./...
|
|
|
|
- run: git diff --cached --exit-code
|
|
|
|
- run: go test ./... -v -cover -coverprofile coverage.out
|
|
|
|
- run: go test -bench . -benchmem
|
|
|
|
|
2022-12-18 14:49:46 +01:00
|
|
|
- uses: codecov/codecov-action@v2
|