Merge pull request #63 from datawire/aosorio/go120 #526
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: quality-assurance | |
on: [push] | |
jobs: | |
check: | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
#- windows-latest | |
go_version: | |
- '1.18.0' | |
- '1.19.0' | |
- '1.20.0' | |
- '1.21.0' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '~${{ matrix.go_version }}' | |
cache: true | |
- run: | | |
if [[ "${{runner.debug}}" == "1" ]]; then | |
DEBUG_FLAGS="-v" | |
fi | |
go test -race ${DEBUG_FLAGS} ./... | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
# Specify the most recent (1.Y.Z) Y release | |
go-version-file: go.mod | |
cache: true | |
- run: make lint | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- run: make generate | |
- run: | | |
git add . | |
if [[ -n "$(git status --porcelain)" ]]; then | |
PAGER= git diff --cached | |
exit 1 | |
fi | |
- run: make build |