Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

feat(tests): fix ruff.

Amir Mehr01b671dedafe
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index 9ef5e2850..5c4df11b1 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -143,3 +143,34 @@ jobs:
echo "DSP_NOTEBOOK_CACHEDIR=$(pwd)" >> $GITHUB_ENV
- name: Run tests with pytest
run: pytest -c tests_integration/pytest.ini tests_integration/
+ another_fix:
+ name: Check Ruff Fix 2
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: Ruff Fix Attempt
+ id: ruff_fix
+ uses: chartboost/ruff-action@v1
+ with:
+ args: --fix-only --exit-non-zero-on-fix
+ continue-on-error: true
+ - name: Capture Ruff Issues
+ if: steps.ruff_fix.outcome == 'failure'
+ run: |
+ echo "Ruff fix failed. Capturing issues..."
+ ruff check . --exit-zero > ruff_issues.txt
+ - name: Echo Ruff Issues
+ if: steps.ruff_fix.outcome == 'failure'
+ run: |
+ echo "Ruff issues found:"
+ cat ruff_issues.txt
+ - name: Fail Workflow if Ruff Fix Failed
+ if: steps.ruff_fix.outcome == 'failure'
+ run: |
+ echo "Ruff fix failed, failing the workflow."
+ echo "Please run 'ruff check . --fix-only' locally and push the changes."
+ exit 1