Extend ExampleExec_withTx for coverage of Query, ForEach #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and coverage | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: | |
- 1.21.x | |
- 1.20.x | |
- 1.19.x | |
- 1.18.x | |
- 1.17.x | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
exclude: | |
# https://github.com/golang/go/issues/51007 | |
- os: windows-latest | |
go-version: 1.19.x | |
- os: windows-latest | |
go-version: 1.18.x | |
- os: windows-latest | |
go-version: 1.17.x | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Download dependencies | |
run: go mod download | |
- name: Run coverage | |
# Powershell Core has problems with '=': -coverprofile=coverage.out | |
run: go test -v -race -coverprofile coverage.out -covermode atomic ./... | |
- name: Upload coverage to Codecov (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: bash <(curl -s https://codecov.io/bash) | |
- name: Upload coverage to Codecov (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
choco install codecov | |
codecov.exe -f coverage.out |