diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml index cff98db7e4..4af4daadeb 100644 --- a/.github/workflows/api-tests.yml +++ b/.github/workflows/api-tests.yml @@ -107,7 +107,9 @@ jobs: api/poetry.lock - name: Poetry check - run: poetry check -C api + run: | + poetry check -C api + poetry show -C api - name: Install dependencies run: poetry install -C api --with dev diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 160641fdf0..cb5400b918 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -100,6 +100,7 @@ jobs: **.yaml **.yml Dockerfile + dev/** - name: Super-linter uses: super-linter/super-linter/slim@v6 diff --git a/dev/sync-poetry b/dev/sync-poetry new file mode 100755 index 0000000000..2dd4dd4fc3 --- /dev/null +++ b/dev/sync-poetry @@ -0,0 +1,15 @@ +#!/bin/bash + +# rely on `poetry` in path +if ! command -v poetry &> /dev/null; then + echo "Installing Poetry ..." + pip install poetry +fi + +# check poetry.lock in sync with pyproject.toml +poetry check -C api --lock +if [ $? -ne 0 ]; then + # update poetry.lock + # refreshing lockfile only without updating locked versions + poetry lock -C api --no-update +fi diff --git a/dev/update-poetry b/dev/update-poetry new file mode 100755 index 0000000000..362a5895b1 --- /dev/null +++ b/dev/update-poetry @@ -0,0 +1,13 @@ +#!/bin/bash + +# rely on `poetry` in path +if ! command -v poetry &> /dev/null; then + echo "Installing Poetry ..." + pip install poetry +fi + +# refreshing lockfile, updating locked versions +poetry update -C api + +# check poetry.lock in sync with pyproject.toml +poetry check -C api --lock