| 1 | name: ci |
| 2 | on: |
| 3 | push: |
| 4 | branches: [trunk, main] |
| 5 | pull_request: |
| 6 | |
| 7 | permissions: |
| 8 | contents: read |
| 9 | |
| 10 | jobs: |
| 11 | ci: |
| 12 | runs-on: ubuntu-latest |
| 13 | steps: |
| 14 | - uses: actions/checkout@v4 |
| 15 | |
| 16 | - uses: actions/setup-go@v5 |
| 17 | with: |
| 18 | go-version: "1.22" |
| 19 | cache: true |
| 20 | |
| 21 | - name: Install golangci-lint |
| 22 | uses: golangci/golangci-lint-action@v6 |
| 23 | with: |
| 24 | version: latest |
| 25 | args: --timeout=5m |
| 26 | |
| 27 | - name: Test |
| 28 | run: go test -trimpath ./... |
| 29 | |
| 30 | - name: Build |
| 31 | run: go build -trimpath ./cmd/shithubd |
| 32 |