Replies: 1 comment
-
👍 this is a must.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the README for hynek/build-and-inspect-python-package @hynek describes a GitHub Actions use case for running tests against a built wheel installation of the package. The idea is that the tests are more "realistic" because they run against the built dist instead of the source tree.
I'm wondering if it's possible for hatch to do something similar, i.e. run
hatch test
against a built wheel of the package in CI (but for local development, I would want to keep the current behavior of runninghatch test
against the editable install of my source tree).I'm imagining the GHA workflow steps like this:
actions/download-artifact@v4
from a previous build job)tar xf dist/*.tar.gz --strip-components=1
)rm -rf src
)actions/setup-python@v5
)pip install --upgrade hatch
)hatch test --installpkg dist/*.whl ...
to install the built wheel and run the tests against it from the sdist (this would implydev-mode = false
)I realize that I could just do this with tox, but then it seems like I'd have to maintain a separate configuration and keep it in sync with the hatch config. It would be nice to have this as a command line flag out of the box without changing any of the hatch config or messing with environments in
pyproject.toml
.Beta Was this translation helpful? Give feedback.
All reactions