Skip to content

chore: de-duplicate golang-lru dependency #313

chore: de-duplicate golang-lru dependency

chore: de-duplicate golang-lru dependency #313

Workflow file for this run

name: Build PRs
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: [1.23, 1.24, 1.25, 1.26]
steps:
- uses: actions/checkout@v6
name: Checkout code
- uses: actions/checkout@v6
name: Checkout client specifications
with:
repository: Unleash/client-specification
ref: refs/tags/v6.1.0
path: testdata/client-specification
- uses: actions/setup-go@v5
name: Setup go
with:
go-version: ${{ matrix.version }}
- name: Get deps
run: go get -t -v ./...
- name: Go vet
run: go vet ./...
- name: Check gofmt
if: matrix.version == '1.26'
run: |
set -euo pipefail
files="$(gofmt -l .)"
if [ -n "$files" ]; then
echo "These files are not gofmt'd:"
echo "$files"
exit 1
fi
- name: Install gotestfmt
run: |
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@v2.5.0
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Run spec tests
set -euo pipefail
run: go test -json ./... -tags='norace' | gotestfmt
- name: Run all tests with race detection
timeout-minutes: 1
run: |
set -euo pipefail
go test -json -race -covermode=atomic -coverprofile=profile.cov ./... -tags='!norace' | gotestfmt
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
continue-on-error: true
with:
path-to-profile: profile.cov
flag-name: Go-${{ matrix.version }}
parallel: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
continue-on-error: true
with:
parallel-finished: true