Skip to content

fix(ci): clean dist/ before build to prevent stale artifact reuse#12

Merged
nullhack merged 42 commits into
mainfrom
fix/pypi-clean-dist
Apr 19, 2026
Merged

fix(ci): clean dist/ before build to prevent stale artifact reuse#12
nullhack merged 42 commits into
mainfrom
fix/pypi-clean-dist

Conversation

@nullhack
Copy link
Copy Markdown
Owner

Summary

  • Adds rm -rf dist/ step before uv build in the PyPI publish workflow to ensure stale build artifacts don't get reused

Root cause

The workflow was reusing old files from dist/ directory, causing the wrong version (3.0) to be published instead of the new version (3.2).

Fix

- name: Clean dist
  run: rm -rf dist/

nullhack added 30 commits April 19, 2026 15:23
- Catch SystemExit from run_hatch() in pytest_configure and call
  pytest.exit(str(exc), returncode=1) for a clean exit instead of INTERNALERROR
- Fix plugin_test.py mock so getoption returns False, preventing hatch
  branch from triggering and silently blocking 3 tests
- Rewrite test_example_hatch_5e6f7a8b to use pytest.main() at CLI boundary,
  capturing stderr and asserting returncode==1 + conflicting path in output
- Rewrite test_example_hatch_3c4d5e6f to use pytest.main() with stdout
  capture, asserting each written .feature relative path appears in output
@nullhack nullhack merged commit 9780b99 into main Apr 19, 2026
7 checks passed
@nullhack nullhack deleted the fix/pypi-clean-dist branch April 19, 2026 23:59
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