From a8134a49c4f9a3c4f825d1b79d622a7f4807aade Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Mon, 14 Oct 2024 22:22:03 +0800 Subject: [PATCH] fix: poetry installation in CI jobs (#9336) --- .github/workflows/api-tests.yml | 7 +++---- .github/workflows/style.yml | 6 +++--- api/README.md | 1 + 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml index b1cf41a226..e9c2b7b086 100644 --- a/.github/workflows/api-tests.yml +++ b/.github/workflows/api-tests.yml @@ -27,18 +27,17 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install Poetry - uses: abatilo/actions-poetry@v3 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: 'poetry' cache-dependency-path: | api/pyproject.toml api/poetry.lock + - name: Install Poetry + uses: abatilo/actions-poetry@v3 + - name: Check Poetry lockfile run: | poetry check -C api --lock diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 719e6cfe90..246854cf0b 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -24,15 +24,15 @@ jobs: with: files: api/** - - name: Install Poetry - uses: abatilo/actions-poetry@v3 - - name: Set up Python uses: actions/setup-python@v5 if: steps.changed-files.outputs.any_changed == 'true' with: python-version: '3.10' + - name: Install Poetry + uses: abatilo/actions-poetry@v3 + - name: Python dependencies if: steps.changed-files.outputs.any_changed == 'true' run: poetry install -C api --only lint diff --git a/api/README.md b/api/README.md index bab33f9293..92cd88a6d4 100644 --- a/api/README.md +++ b/api/README.md @@ -85,3 +85,4 @@ cd ../ poetry run -C api bash dev/pytest/pytest_all_tests.sh ``` +