Spaces:
Build error
Build error
| name: CI Pipeline | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-cov numpy pandas rank-bm25 | |
| pip install sentence-transformers | |
| - name: Run tests with coverage | |
| run: | | |
| export PYTHONPATH=$PYTHONPATH:. | |
| pytest tests/ --cov=src --cov-report=xml --cov-report=term-missing --cov-fail-under=85 --ignore=tests/test_pipeline.py --junitxml=reports/junit/test-results.xml | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: reports/junit/test-results.xml | |
| - name: Upload Coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.RAG_CODECOV_KEY }} | |
| files: ./coverage.xml | |
| fail_ci_if_error: false |