@@ -34,18 +34,21 @@ jobs:
34
34
- << pipeline.parameters.cache-prefix >>-{{ arch }}-{{ .Environment.BASE_BRANCH }}
35
35
- << pipeline.parameters.cache-prefix >>-{{ arch }}-
36
36
- run :
37
- name : Install Poetry 2.0.1
37
+ name : Install Poetry 2.0.1 locally
38
38
command : |
39
- curl -sSL https://install.python-poetry.org | POETRY_VERSION='2.0.1' python3 -
39
+ python3 -m venv .poetry-venv
40
+ .poetry-venv/bin/pip install poetry==2.0.1
41
+ ln -s .poetry-venv/bin/poetry poetry-binary
40
42
- run :
41
43
name : Install python dependencies
42
44
command : |
43
- poetry config virtualenvs.in-project true
44
- poetry install
45
+ ./ poetry-binary config virtualenvs.in-project true
46
+ ./ poetry-binary install
45
47
- save_cache :
46
48
key : << pipeline.parameters.cache-prefix >>-{{ arch }}-{{ checksum "poetry.lock" }}
47
49
paths :
48
50
- .venv
51
+ - .poetry-venv
49
52
- persist_to_workspace :
50
53
root : .
51
54
paths :
62
65
# ruff check --select I . : check linting and imports sorting without fixing (to fix, use --fix)
63
66
# ruff format --check . : check code formatting without fixing (to fix, remove --check)
64
67
command : |
65
- poetry run ruff check --select I .
66
- poetry run ruff format --check .
68
+ ./ poetry-binary run ruff check --select I .
69
+ ./ poetry-binary run ruff format --check .
67
70
68
71
tests :
69
72
docker :
90
93
echo "$TESTFILES"
91
94
# Run the found tests
92
95
if [ -n "$TESTFILES" ]; then
93
- poetry run pytest --junitxml=reports/python/tests.xml -p no:sugar --color=yes $TESTFILES
96
+ ./ poetry-binary run pytest --junitxml=reports/python/tests.xml -p no:sugar --color=yes $TESTFILES
94
97
else
95
98
echo "No tests to run in this split"
96
99
exit 1
@@ -133,8 +136,8 @@ jobs:
133
136
command : |
134
137
RELEASE_VERSION=$(cat version.txt)
135
138
# Set the version in pyproject.toml
136
- poetry version $RELEASE_VERSION
137
- poetry build
139
+ ./ poetry-binary version $RELEASE_VERSION
140
+ ./ poetry-binary build
138
141
- store_artifacts :
139
142
path : dist
140
143
- persist_to_workspace :
@@ -152,7 +155,7 @@ jobs:
152
155
- run :
153
156
name : Publish on PyPI
154
157
command : |
155
- poetry publish --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction
158
+ ./ poetry-binary publish --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction
156
159
157
160
trigger-gitlab-pipeline :
158
161
docker :
0 commit comments