Add GitHub actions (run tests and publish to pypi with uv)#53
Add GitHub actions (run tests and publish to pypi with uv)#53bbelderbos merged 12 commits intomainfrom
Conversation
|
@rhelmstedter I had ruff in here as well, but let's leave that local / pre-commit only. |
|
@rhelmstedter thanks for that free bite change, I updated the workflow to also run e2e tests then, is this good like this? 🙏 |
|
Fails: https://github.com/PyBites-Open-Source/eatlocal/actions/runs/12301827344/job/34333263110 |
|
That makes sense. I just checked and there are no need for credentials in the unit tests. You do need valid credentials to do the e2e testing. |
|
ok thanks, reverted back to unit test only |
|
@rhelmstedter renamed test workflow and added one for publishing to pypi with uv, can you review again please? 🙏 |
| run: uv sync --all-extras --dev | ||
|
|
||
| - name: Run tests | ||
| run: uv run pytest tests -k "not test_e2e" |
There was a problem hiding this comment.
| run: uv build | ||
|
|
||
| - name: Publish to TestPyPI (for test tags) | ||
| if: startsWith(github.ref, 'refs/tags/test-') |
There was a problem hiding this comment.
I added ifs here to only use test pypi for test tags, is that ok?
| run: uv publish --index-url https://test.pypi.org/legacy/ --token ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
|
|
||
| - name: Publish to PyPI (for versioned releases) | ||
| if: startsWith(github.ref, 'refs/tags/v') |
There was a problem hiding this comment.
not sure if we can test this without doing the real thing:
git tag vx.y.z
git push origin vx.y.z
There was a problem hiding this comment.
Only one way to find out :)
|
Looks good. Let's go for it. |
|
ok thanks @rhelmstedter |
fixes #52