| 1 | name: test |
| 2 | on: [push] |
| 3 | |
| 4 | jobs: |
| 5 | golangci-lint: |
| 6 | runs-on: ubuntu-latest |
| 7 | steps: |
| 8 | - uses: actions/checkout@v4 |
| 9 | |
| 10 | - name: Setup Go |
| 11 | uses: actions/setup-go@v4 |
| 12 | with: |
| 13 | go-version-file: "go.mod" |
| 14 | cache: true |
| 15 | |
| 16 | - uses: golangci/golangci-lint-action@v3 |
| 17 | with: |
| 18 | version: latest |
| 19 | |
| 20 | test: |
| 21 | strategy: |
| 22 | fail-fast: false |
| 23 | matrix: |
| 24 | platform: |
| 25 | - ubuntu |
| 26 | - macOS |
| 27 | |
| 28 | name: "${{ matrix.platform }}" |
| 29 | |
| 30 | runs-on: ${{ matrix.platform }}-latest |
| 31 | |
| 32 | steps: |
| 33 | - uses: actions/checkout@v4 |
| 34 | |
| 35 | - name: Setup Go |
| 36 | uses: actions/setup-go@v4 |
| 37 | with: |
| 38 | go-version-file: "go.mod" |
| 39 | cache: true |
| 40 | |
| 41 | - name: Install gofumpt |
| 42 | run: go install mvdan.cc/gofumpt@latest |
| 43 | - name: Format check |
| 44 | run: gofumpt -l . |
| 45 | |
| 46 | - name: Go test |
| 47 | run: make test |