| 1 | name: test |
| 2 | on: |
| 3 | pull_request: |
| 4 | paths-ignore: |
| 5 | - '*.md' |
| 6 | push: |
| 7 | branches: |
| 8 | - master |
| 9 | paths-ignore: |
| 10 | - '*.md' |
| 11 | jobs: |
| 12 | test: |
| 13 | name: test |
| 14 | runs-on: ubuntu-latest |
| 15 | timeout-minutes: 3 |
| 16 | steps: |
| 17 | - uses: actions/setup-go@v3 |
| 18 | with: |
| 19 | go-version: 1.19 |
| 20 | - uses: actions/checkout@v3 |
| 21 | - name: Benchmark |
| 22 | run: go test -bench . -race |
| 23 | - name: Test (race) |
| 24 | run: go test -mod vendor ./... -race |
| 25 | - name: Test (coverage) |
| 26 | run: go test -mod vendor ./... -coverprofile=coverage.txt -covermode=atomic |
| 27 | - name: Codecov |
| 28 | uses: codecov/[email protected] |
| 29 | with: |
| 30 | files: ./coverage.txt |