Run tests in CI and distribute package
This MR does 2 things:
- Run tests in CI, this includes setup treesitter in the installation step.
- Build package wheel and publish to the project's package registry.
- Configure poetry to include treesitter .so file in the wheel
- CI job to upload to registry
How to publish a new version
- Run
git tag -a {version_number} -m "version message"
- Run
git push origin {version_number}
Note that we should not modify the tool.poetry.version
field in pyproject.toml
, that field is only a placeholder. Instead, in the dist CI job, we fetch the git tag name, and use that as the new version number.
Also note that we shouldn't tag any commits in a MR, only tag commits in main branch.
Ref https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/prompt-library/-/issues/5
Edited by Mon Ray