| 1 | on: |
| 2 | push: |
| 3 | branches: [ main ] |
| 4 | pull_request: |
| 5 | name: Test |
| 6 | jobs: |
| 7 | test: |
| 8 | strategy: |
| 9 | matrix: |
| 10 | go-version: [1.19.x,1.20.x] |
| 11 | platform: [ubuntu-latest, macos-latest, windows-latest] |
| 12 | runs-on: ${{ matrix.platform }} |
| 13 | steps: |
| 14 | - name: Install Go |
| 15 | uses: actions/setup-go@v3 |
| 16 | with: |
| 17 | go-version: ${{ matrix.go-version }} |
| 18 | - name: Install golint |
| 19 | run: go install golang.org/x/lint/golint@latest |
| 20 | shell: bash |
| 21 | - name: Update PATH |
| 22 | run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH |
| 23 | shell: bash |
| 24 | - name: Checkout code |
| 25 | uses: actions/checkout@v1 |
| 26 | - name: Test |
| 27 | run: go test -race . |