Merge pull request #41 from mreiferson/issue-38 #29
This file contains hidden or 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: tests | |
| on: | |
| push: {branches: [master]} | |
| pull_request: {branches: [master]} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-20.04 | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| gover: | |
| - "1.18" | |
| - "1.19" | |
| - "1.20" | |
| goarch: | |
| - "amd64" | |
| - "386" | |
| container: "golang:${{matrix.gover}}" | |
| env: | |
| GOARCH: "${{matrix.goarch}}" | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: test | |
| run: | | |
| go test -list Test | |
| GOMAXPROCS=1 go test | |
| if [ "$GOARCH" = "amd64" ]; then | |
| echo "With -race:" | |
| GOMAXPROCS=4 go test -race | |
| fi | |
| - name: lint | |
| run: | | |
| go vet | |
| GOFMT_OUT=$(gofmt -l *.go) | |
| if [ -n "$GOFMT_OUT" ]; then | |
| echo $GOFMT_OUT | |
| exit 1 | |
| fi |