Skip to content

Conversation

@mafredri
Copy link
Member

Remove bench-dev and test-dev jobs from daily workflow since the dev
branch no longer exists.

Add ci/static.sh script to generate coverage badge for GitHub Pages.

Refs #539

Remove bench-dev and test-dev jobs from daily workflow since the dev
branch no longer exists.

Add ci/static.sh script to generate coverage badge for GitHub Pages.

Refs #539
@mafredri mafredri requested a review from mtojek December 16, 2025 18:59
@mafredri mafredri enabled auto-merge (squash) December 16, 2025 18:59
@mafredri mafredri changed the title chore(ci): remove dev branch jobs and add static.sh ci: remove dev branch jobs and add static.sh Dec 16, 2025
@mafredri mafredri disabled auto-merge December 16, 2025 19:13
@mafredri mafredri enabled auto-merge (squash) December 16, 2025 19:14
rm -rf ./ci/out/static
mkdir -p ./ci/out/static
cp ./ci/out/coverage.html ./ci/out/static/coverage.html
percent=$(go tool cover -func ./ci/out/profile.txt | tail -n1 | awk '{print $3}' | tr -d '%')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set pipefail?

#!/usr/bin/env bash
set -eu

cd -- "$(dirname "$0")/.."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cd --

bonus 👍 for the edge case, but I'm curious if you stumbled upon it :)

mkdir -p ./ci/out/static
cp ./ci/out/coverage.html ./ci/out/static/coverage.html
percent=$(go tool cover -func ./ci/out/profile.txt | tail -n1 | awk '{print $3}' | tr -d '%')
wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${percent}%25-success"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't curl more universal option?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can parametrize batch color depending on the percent (high/medium/low)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants