Skip to content

Commit e7752e8

Browse files
chore: development script for syncing Poetry lockfile (langgenius#5170)
1 parent 43c1900 commit e7752e8

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

.github/workflows/api-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ jobs:
107107
api/poetry.lock
108108
109109
- name: Poetry check
110-
run: poetry check -C api
110+
run: |
111+
poetry check -C api
112+
poetry show -C api
111113
112114
- name: Install dependencies
113115
run: poetry install -C api --with dev

.github/workflows/style.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
**.yaml
101101
**.yml
102102
Dockerfile
103+
dev/**
103104
104105
- name: Super-linter
105106
uses: super-linter/super-linter/slim@v6

dev/sync-poetry

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# rely on `poetry` in path
4+
if ! command -v poetry &> /dev/null; then
5+
echo "Installing Poetry ..."
6+
pip install poetry
7+
fi
8+
9+
# check poetry.lock in sync with pyproject.toml
10+
poetry check -C api --lock
11+
if [ $? -ne 0 ]; then
12+
# update poetry.lock
13+
# refreshing lockfile only without updating locked versions
14+
poetry lock -C api --no-update
15+
fi

dev/update-poetry

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# rely on `poetry` in path
4+
if ! command -v poetry &> /dev/null; then
5+
echo "Installing Poetry ..."
6+
pip install poetry
7+
fi
8+
9+
# refreshing lockfile, updating locked versions
10+
poetry update -C api
11+
12+
# check poetry.lock in sync with pyproject.toml
13+
poetry check -C api --lock

0 commit comments

Comments
 (0)