| 1 | name: Go |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | branches: [main] |
| 8 | |
| 9 | permissions: |
| 10 | contents: read |
| 11 | |
| 12 | jobs: |
| 13 | test-build: |
| 14 | name: Test build |
| 15 | strategy: |
| 16 | matrix: |
| 17 | go-version: [1.15.x, 1.16.x, 1.17.x] |
| 18 | runs-on: ubuntu-latest |
| 19 | steps: |
| 20 | - name: Set up Go 1.x |
| 21 | uses: actions/setup-go@v2 |
| 22 | with: |
| 23 | go-version: ${{ matrix.go-version }} |
| 24 | - name: Check out repository |
| 25 | uses: actions/checkout@v2 |
| 26 | - name: Run tests |
| 27 | run: ./test |
| 28 | - name: Run linter |
| 29 | uses: golangci/golangci-lint-action@v2 |
| 30 | with: |
| 31 | version: v1.42.0 |
| 32 | args: -E=gofmt --timeout=30m0s |