name: CI on: push: branches: [main, master] pull_request: branches: [main, master] jobs: test: name: Test (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod cache: true - name: Download modules run: go mod download - name: Vet run: go vet ./... - name: Build run: go build -trimpath ./... - name: Test run: go test -short -race ./... lint: name: Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: version: latest