Skip to content

Commit f9b2b08

Browse files
committed
Use project's poetry version in github actions
1 parent 5b9f5ff commit f9b2b08

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/code-checks.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ jobs:
1818
with:
1919
python-version: '3.11.10'
2020
- name: Install poetry
21-
run: pip install poetry
21+
run: |
22+
POETRY_VERSION=$(grep -E '^requires-poetry = ' pyproject.toml | sed -E 's/requires-poetry = "(.*)"/\1/')
23+
pip install poetry==$POETRY_VERSION
2224
- name: Install dependencies
23-
run: python -m poetry install
25+
run: poetry install
2426
- name: Ruff check
2527
run: poetry run ruff check .
2628
- name: Ruff format check
@@ -36,9 +38,11 @@ jobs:
3638
with:
3739
python-version: '3.11.10'
3840
- name: Install poetry
39-
run: pip install poetry
41+
run: |
42+
POETRY_VERSION=$(grep -E '^requires-poetry = ' pyproject.toml | sed -E 's/requires-poetry = "(.*)"/\1/')
43+
pip install poetry==$POETRY_VERSION
4044
- name: Install dependencies
41-
run: python -m poetry install
45+
run: poetry install
4246
- name: configure AWS
4347
uses: aws-actions/configure-aws-credentials@v4
4448
with:

0 commit comments

Comments
 (0)