diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 46944b4f..3a453a18 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,6 +11,15 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.1 with: python-version: "3.10" + # Step 3: Install dependencies (from requirements.txt or Pipfile) + - name: Install dependencies + run: | + python -m venv venv + source venv/bin/activate + cd model_server + pip install --upgrade pip + pip install -r requirements.txt # Or use pipenv install + - uses: pre-commit/action@v3.0.1 + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9a93da5..44b6a67c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: python-tests name: Run Python Tests with pytest language: system - entry: bash -c "python -m venv venv && source venv/bin/activate && cd model_server && pip install -r requirements.txt && PYTHONPATH=. pytest --maxfail=5 --disable-warnings" + entry: bash -c "PYTHONPATH=. pytest --maxfail=5 --disable-warnings" types: [python]