Spaces:
Runtime error
Runtime error
name: Poetry Lock Verification | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: poetry install --no-root | |
- name: Check if poetry.lock is in sync | |
run: poetry check | |
- name: Verify if poetry.lock is in sync | |
run: | | |
if git diff --name-only HEAD | grep -qE '(pyproject\.toml|poetry\.lock)'; then | |
echo "::error::'pyproject.toml' or 'poetry.lock' is out of sync. Please run 'poetry lock' locally and commit the changes." | |
exit 1 | |
fi | |