Skip to content

Commit

Permalink
ci: create install_deps step before the rest
Browse files Browse the repository at this point in the history
I think the deps caching step is crashing with basedpyright, so I'm putting that earlier so it won't be trying to re-cache it after the basedpyright step.
  • Loading branch information
amitkparekh authored Aug 26, 2024
1 parent e9c205a commit 55f15a0
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
id: filter
with:
filters: |
deps:
- 'pyproject.toml'
- 'pdm.lock'
python:
- '**/*.py'
- 'storage/fixtures/**/*'
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 55f15a0

Please sign in to comment.