name: CI on: pull_request: branches: - internal - main workflow_dispatch: permissions: contents: read concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: build-and-test: name: Build, vet, test runs-on: ubuntu-latest timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version-file: go.mod cache: true - name: Download modules run: go mod download - name: Build run: go build ./... - name: Vet run: go vet ./... - name: Test run: go test -race -count=1 ./... lint: name: golangci-lint runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version-file: go.mod cache: true - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: version: latest args: --timeout=5m