Skip to content

Commit

Permalink
ci: ensure the matching poetry version is used
Browse files Browse the repository at this point in the history
Also ensure the dependencies version match the one in the repo at
releasing.

Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Dec 9, 2024
1 parent 5069156 commit 75ffafe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/actions/setup-python-build-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ description: "Install everything needed to build"
runs:
using: "composite"
steps:
- name: Upgrage pip and install poetry
- name: Install poetry
shell: bash
run: |
pip install --upgrade pip
pip install --user "poetry==1.5.1"
pipx install poetry
1 change: 0 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
run: |
proj_version=$(poetry version -s)
if [ $proj_version != $TAG_VERSION ]; then echo "Version $proj_version, defined in pyproject.toml, does not match TAG $TAG_VERSION of this release"; exit 3; fi
poetry update
poetry publish --build -u __token__ -p $PYPI_TOKEN
env:
TAG_VERSION: ${{ steps.context.outputs.TAG_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ help:
@echo " release version=<sem. version> bumps the project version to <sem. version>, using poetry;"
@echo " Updates also docs/source/conf.py version;"
@echo " If no version is provided, poetry outputs the current project version"
@echo " test run all the tests and linting"
@echo " tests run all the tests and linting"
@echo " update updates the dependencies in poetry.lock"
@echo ""
@echo "Check the Makefile to know exactly what each target is doing."
Expand All @@ -37,7 +37,7 @@ docs: .install-poetry
poetry run sphinx-build -b html docs/source docs/build

format: .install-poetry
poetry run isort ocpp tests && poetry run black ocpp tests
poetry run isort ocpp tests && poetry run black ocpp tests

tests: .install-poetry
poetry run black --check --diff ocpp tests
Expand Down

0 comments on commit 75ffafe

Please sign in to comment.