Skip to content

Fix addMetrics() of ShardedLRU #3

Fix addMetrics() of ShardedLRU

Fix addMetrics() of ShardedLRU #3

name: FreeLRU
on:
push:
branches: [main]
pull_request:
branches: ["**"]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 2
matrix:
go: ["stable"]
steps:
- name: Set up Go ${{matrix.go}}
uses: actions/setup-go@v4
with:
go-version: ${{matrix.go}}
check-latest: true
id: go
- name: Check out
uses: actions/checkout@v4
- name: Linter
run: |
go version
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
make lint
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 2
matrix:
go: ["stable", "1.18.10"]
steps:
- name: Set up Go ${{matrix.go}}
uses: actions/setup-go@v4
with:
go-version: ${{matrix.go}}
check-latest: true
id: go
- name: Check out
uses: actions/checkout@v4
- name: Run Test
run: |
make check
bench:
name: Bench
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 2
matrix:
go: ["stable"]
steps:
- name: Set up Go ${{matrix.go}}
uses: actions/setup-go@v4
with:
go-version: ${{matrix.go}}
check-latest: true
id: go
- name: Check out
uses: actions/checkout@v4
- name: Run Benchmarks
run: |
GOMAXPROCS=100 make bench
coverage:
name: Coverage
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 2
matrix:
go: ["stable"]
permissions:
contents: write
steps:
- name: Set up Go ${{matrix.go}}
uses: actions/setup-go@v4
with:
go-version: ${{matrix.go}}
check-latest: true
id: go
- name: Check out
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Build
run: |
go install
- name: Run Coverage
run: |
go test -v -cover ./... -coverprofile coverage.out -coverpkg ./...
- name: Report Coveralls
run: curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz && ./coveralls report coverage.out --format=golang
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}