Skip to content

Commit 1407095

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

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/code-checks.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ jobs:
1717
- uses: actions/setup-python@v5
1818
with:
1919
python-version: '3.11.10'
20-
- name: Install poetry
21-
run: pip install poetry
20+
run: |
21+
POETRY_VERSION=$(grep -E '^requires-poetry = ' pyproject.toml | sed -E 's/requires-poetry = "(.*)"/\1/')
22+
pip install poetry==$POETRY_VERSION
2223
- name: Install dependencies
23-
run: python -m poetry install
24+
run: poetry install
2425
- name: Ruff check
2526
run: poetry run ruff check .
2627
- name: Ruff format check
@@ -36,9 +37,11 @@ jobs:
3637
with:
3738
python-version: '3.11.10'
3839
- name: Install poetry
39-
run: pip install poetry
40+
run: |
41+
POETRY_VERSION=$(grep -E '^requires-poetry = ' pyproject.toml | sed -E 's/requires-poetry = "(.*)"/\1/')
42+
pip install poetry==$POETRY_VERSION
4043
- name: Install dependencies
41-
run: python -m poetry install
44+
run: poetry install
4245
- name: configure AWS
4346
uses: aws-actions/configure-aws-credentials@v4
4447
with:

0 commit comments

Comments
 (0)