Github Action: Fix poetry lock file checking (#4789)

Fix how poetry lock file is checked to avoid skipping caches silently.
This commit is contained in:
Eugene Yurtsev
2023-05-16 11:40:28 -04:00
committed by GitHub
parent 7ce43372c3
commit 14bedf1cc5
3 changed files with 77 additions and 4 deletions

View File

@@ -33,11 +33,13 @@ runs:
using: composite
steps:
- uses: actions/setup-python@v4
name: Setup python $${ inputs.python-version }}
with:
python-version: ${{ inputs.python-version }}
- uses: actions/cache@v3
id: cache-pip
name: Cache Pip ${{ inputs.python-version }}
env:
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
with:
@@ -48,6 +50,11 @@ runs:
- run: pipx install poetry==${{ inputs.poetry-version }} --python python${{ inputs.python-version }}
shell: bash
- name: Check lock file
shell: bash
run: |
poetry lock --check
- uses: actions/cache@v3
id: cache-poetry
env:

View File

@@ -31,9 +31,6 @@ jobs:
poetry-version: "1.4.2"
cache-key: ${{ matrix.test_type }}
install-command: |
echo "Check the poetry lock file. If this fails use poetry to " \
"update the lock file: `poetry update` or refresh it `poetry lock --no-update`"
poetry lock --check
if [ "${{ matrix.test_type }}" == "core" ]; then
echo "Running core tests, installing dependencies with poetry..."
poetry install