name: CI on: push: branches: [ "**" ] permissions: read-all jobs: lint-test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Setup Go uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version-file: "go.mod" - name: Cache Go build uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: path: | ~/.cache/go-build ~/go/pkg/mod key: go-${{ runner.os }}-${{ hashFiles('**/go.sum') }} restore-keys: | go-${{ runner.os }}- - name: Install golangci-lint uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 with: version: latest - name: Lint run: golangci-lint run - name: Test run: go test ./... -race -coverprofile=coverage.out