diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a85fca..3a96ef0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,9 @@ jobs: id: filter with: filters: | + deps: + - 'pyproject.toml' + - 'pdm.lock' python: - '**/*.py' - 'storage/fixtures/**/*' @@ -44,9 +47,26 @@ jobs: pre_commit_config: - '.pre-commit-config.yaml' - test: + install_deps: runs-on: ubuntu-latest needs: [changes] + if: ${{needs.changes.outputs.deps == 'true' && !github.event.pull_request.draft }} + steps: + - name: Checkpout repository + uses: actions/checkout@v4 + + - name: Setup PDM + uses: pdm-project/setup-pdm@v4 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: true + + - name: Install dependencies + run: pdm install + + test: + runs-on: ubuntu-latest + needs: [changes, install_deps] if: ${{needs.changes.outputs.python == 'true' && !github.event.pull_request.draft }} steps: - name: Checkpout repository @@ -107,7 +127,7 @@ jobs: based_pyright: runs-on: ubuntu-latest - needs: [changes] + needs: [changes, install_deps] if: ${{needs.changes.outputs.python == 'true' && !github.event.pull_request.draft }} steps: - name: Checkout repository