Spaces:
Sleeping
Sleeping
| name: Run Unit Tests | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| unit_tests: | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12'] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| working-directory: multi_llm_chatbot_backend | |
| run: | | |
| pip install wheel | |
| pip install -r requirements.txt -r test_requirements.txt | |
| - name: Run unit tests | |
| working-directory: multi_llm_chatbot_backend | |
| run: | | |
| pytest app/tests/unit/ --junitxml=test-results/results.xml | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-py${{ matrix.python-version }} | |
| path: multi_llm_chatbot_backend/test-results/ | |