Skip to content

Add ShouldCache option #25

Add ShouldCache option

Add ShouldCache option #25

Workflow file for this run

on:
push:
branches: [master]
pull_request:
name: Test
permissions:
contents: read
jobs:
test:
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ${{ matrix.go-version }}
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
shell: bash
- name: Update PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Fmt
if: matrix.platform != 'windows-latest'
run: "diff <(gofmt -d .) <(printf '')"
shell: bash
- name: Vet
run: go vet ./...
- name: Staticcheck
# Ubuntu latest go.
if: strategy.job-index == 3
run: staticcheck ./...
- name: Test
run: go test -race ./... -coverpkg=./...