Add support for CLOCK cache #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: [push, workflow_dispatch, pull_request_target] | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest, ubuntu-latest] | |
goversion: [1.17, 1.18, '1.19', '1.20', '1.21', '1.22'] | |
steps: | |
- name: Set up Go ${{matrix.goversion}} on ${{matrix.os}} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{matrix.goversion}} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v1 | |
- name: gofmt | |
if: ${{matrix.goversion == '1.22'}} | |
run: | | |
[[ -z $(gofmt -l $(find . -name '*.go') ) ]] | |
- name: Get dependencies | |
env: | |
GO111MODULE: on | |
run: go mod download | |
- name: Vet | |
env: | |
GO111MODULE: on | |
run: go vet -mod=readonly ./... | |
- name: Test | |
env: | |
GO111MODULE: on | |
run: go test -mod=readonly -count 2 ./... | |
- name: Race Test | |
env: | |
GO111MODULE: on | |
run: go test -race -mod=readonly -count 2 ./... | |
# Run all consistenthash Fuzz tests for 30s with go 1.20 | |
- name: Fuzz Consistent-Hash | |
if: ${{matrix.goversion == '1.20'}} | |
env: | |
GO111MODULE: on | |
run: go test -fuzz=. -fuzztime=30s ./consistenthash | |
# Run all the tests with the paranoid linked-list checks enabled | |
- name: Race Test Paranoid LinkedList | |
env: | |
GO111MODULE: on | |
run: | | |
sed -e 's/const paranoidLL = false/const paranoidLL = true/' < lru/typed_ll.go > lru/typed_ll.go.new | |
mv lru/typed_ll.go.new lru/typed_ll.go | |
go test -race -mod=readonly -count 2 ./... |