name: CI on: push: branches: [master] pull_request: permissions: contents: read jobs: library: name: library (go ${{ matrix.go }}) runs-on: ubuntu-latest strategy: matrix: go: ["1.23", "1.24"] steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} - name: gofmt run: test -z "$(gofmt -s -l .)" || (gofmt -s -l . && exit 1) - name: vet run: go vet ./... - name: build run: go build ./... - name: test run: go test -race ./... example: name: example runs-on: ubuntu-latest defaults: run: working-directory: example steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.25" - name: gofmt run: test -z "$(gofmt -s -l .)" || (gofmt -s -l . && exit 1) - name: vet run: go vet ./... - name: build run: go build ./... - name: test run: go test -race ./...