-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup Python client PoC #2
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This workflow will build the python distribution and it will publish to Pypi | ||
# This is going to be triggered on on every tag `v*`, e.g., `v0.13`. | ||
# TODO: trigger tests once implemented, to ensure everything is working before publishing | ||
name: Publish Horreum library | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.session }} ${{ matrix.python }} | ||
runs-on: ubuntu-latest | ||
env: | ||
FORCE_COLOR: "1" | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install development dependencies | ||
run: pip install -r dev-requirements.txt | ||
- name: Check version coherence | ||
run: | | ||
PROJECT_VERSION=$(poetry version | cut -d' ' -f2) | ||
GIT_TAG=$(git describe --tags --match="v*") | ||
if [[ "${GIT_TAG:1}" =~ $PROJECT_VERSION ]]; then | ||
echo "::error title='$GIT_TAG tag does not match project version'::" | ||
exit 1 | ||
fi | ||
- name: Build python library | ||
run: make generate && poetry build --ansi | ||
- name: Publish package on PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
print-hash: true | ||
packages-dir: ./dist/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,11 @@ Install all dev dependencies (consider using Python virtual environments): | |
pip install -r dev-requirements.txt | ||
``` | ||
|
||
Generate source files | ||
```bash | ||
make generate | ||
``` | ||
|
||
Comment on lines
+50
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this change have been made to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I am updating that in a followup PR, as I said in one of the previous comments, this is gonna be replaced by |
||
Build the library using `poetry`: | ||
```bash | ||
poetry build | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where you are defining the
matrix
. Should that be here, or is it set up in a calling workflow?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover