Skip to content

Add README badges and release-workflow test gate - #113

Merged
randileeharper merged 1 commit into
mainfrom
ci/readme-badges-release-test-gate
Jun 29, 2026
Merged

Add README badges and release-workflow test gate#113
randileeharper merged 1 commit into
mainfrom
ci/readme-badges-release-test-gate

Conversation

@randileeharper

Copy link
Copy Markdown
Owner

Summary

Mirrors magpie#75. Two polish items:

  1. README badges — add a CI status badge and a version shield directly under the # Vesper H1. The CI badge links to the ci.yml workflow runs; the version shield uses github/v/tag (consistent with the README's existing @v0.1.0 install example, and accurate now that tags exist but no GitHub Releases are published yet).
  2. Release-workflow test gate — add uv sync --extra dev and uv run pytest -q steps to release.yml before uv build, so a broken tag push is caught before it produces artifacts. Both steps set SETUPTOOLS_SCM_PRETEND_VERSION: "0.0.0" to pin the test environment to a stable version; the real tag-derived version is used only by the uv build step (which does NOT set the env var).

No source code, packaging metadata, or lockfile changes. ci.yml is untouched (it already runs the full ruff/mypy/pytest gate).

Verification

All run locally on ci/readme-badges-release-test-gate (2 commits past v0.1.0):

# 1. Badge presence / repo name (AC.1)
grep -nE '!\[CI\]|!\[Version\]' README.md
# → both badge lines present, URLs point to randileeharper/vesper

# 2. Workflow structure / step order / env-var asymmetry (AC.2–AC.4)
grep -nE 'name:|SETUPTOOLS_SCM_PRETEND_VERSION|run: uv (build|sync|run pytest)' .github/workflows/release.yml
# → order: Set up uv → Install dependencies → Run tests → Build sdist and wheel → Upload artifacts → Create GitHub Release
# → both new steps set SETUPTOOLS_SCM_PRETEND_VERSION="0.0.0"; uv build does NOT

# 3. Test suite under pretend-version — the exact gate command (AC.5)
SETUPTOOLS_SCM_PRETEND_VERSION="0.0.0" uv run pytest -q
# → 281 passed, 102 warnings in 2.64s

# 4. Build version is NOT the fallback — env-var does not leak into uv build (AC.7)
uv build
uv run python -c "import importlib.metadata as m; v=m.metadata('vesper')['Version']; print(v); assert v != '0.0.0'"
# → 0.1.1.dev4+gfe02da397.d20260629  (real tag-derived dev version, not 0.0.0)

Build artifacts cleaned up before commit; only README.md and .github/workflows/release.yml are staged.

Mirror magpie#75: add CI status and version badges to README, and gate
the release build on a green test suite so a broken tag push is caught
before it produces artifacts.

- README.md: CI + version badges under the H1
- release.yml: uv sync --extra dev + uv run pytest -q before uv build,
  with SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 pinning the test environment
@randileeharper
randileeharper merged commit 7356a28 into main Jun 29, 2026
1 check passed
@randileeharper
randileeharper deleted the ci/readme-badges-release-test-gate branch June 29, 2026 02:27
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.

1 participant