Python Backend Tests on 7428/merge by @awkoy #753
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Python Backend Tests" | |
| run-name: "Python Backend Tests on ${{ github.ref_name }} by @${{ github.actor }}" | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| on: | |
| pull_request: | |
| paths: | |
| - "apps/opik-python-backend/**" | |
| - ".github/workflows/python_backend_tests.yml" | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - "apps/opik-python-backend/**" | |
| - ".github/workflows/python_backend_tests.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| run-python-backend-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: apps/opik-python-backend/ | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt -r tests/test_requirements.txt | |
| pip install . | |
| - name: Run unit tests | |
| env: | |
| PYTHON_CODE_EXECUTOR_STRATEGY: process | |
| PYTHON_CODE_EXECUTOR_EXEC_TIMEOUT_IN_SECS: 10 | |
| run: | | |
| cd tests && pytest unit -v --durations=0 --junitxml=../test-results.xml | |
| - name: Publish Test Report | |
| uses: EnricoMi/publish-unit-test-result-action/linux@v2 | |
| if: always() | |
| with: | |
| action_fail: true | |
| comment_mode: failures | |
| check_name: Python Backend Tests Results | |
| files: apps/opik-python-backend/test-results.xml |