Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Set up Go 1.x
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ REGISTRY ?= gcr.io/k8s-staging-kube-state-metrics
TAG_PREFIX = v
VERSION = $(shell grep '^version:' data.yaml | grep -oE "[0-9]+.[0-9]+.[0-9]+")
TAG ?= $(TAG_PREFIX)$(VERSION)
LATEST_RELEASE_BRANCH := release-$(shell echo $(VERSION) | grep -ohE "[0-9]+.[0-9]+")
BRANCH = $(strip $(shell git rev-parse --abbrev-ref HEAD))
PKGS = $(shell go list ./... | grep -v /vendor/ | grep -v /tests/e2e)
ARCH ?= $(shell go env GOARCH)
Expand Down Expand Up @@ -99,7 +98,7 @@ generate-template:
validate-template: generate-template
git diff --no-ext-diff --quiet --exit-code README.md

# Runs benchmark tests on the current git ref and the last release and compares
# Runs benchmark tests on the current git ref and the previous release tag and compares
# the two.
test-benchmark-compare:
$(MAKE) test-benchmark-compare-main test-benchmark-compare-release
Expand All @@ -109,8 +108,8 @@ test-benchmark-compare-main:
./tests/compare_benchmarks.sh main 6

test-benchmark-compare-release:
@git fetch origin ${LATEST_RELEASE_BRANCH}
./tests/compare_benchmarks.sh ${LATEST_RELEASE_BRANCH} 6
@git fetch --tags origin
./tests/compare_benchmarks.sh $$(git describe --tags --abbrev=0 HEAD^) 6

all: all-container

Expand Down