|
| 1 | +name: INTEGRATION & E2E TESTS - inference SDK |
| 2 | +permissions: |
| 3 | + contents: read |
| 4 | +on: |
| 5 | + pull_request: |
| 6 | + branches: [main] |
| 7 | + push: |
| 8 | + branches: [main] |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +jobs: |
| 12 | + call_is_mergeable: |
| 13 | + uses: ./.github/workflows/check_if_branch_is_mergeable.yml |
| 14 | + secrets: inherit |
| 15 | + |
| 16 | + integration-tests: |
| 17 | + needs: call_is_mergeable |
| 18 | + if: ${{ github.event_name != 'pull_request' || needs.call_is_mergeable.outputs.mergeable_state != 'not_clean' }} |
| 19 | + runs-on: |
| 20 | + labels: depot-ubuntu-22.04-4 |
| 21 | + group: public-depot |
| 22 | + timeout-minutes: 20 |
| 23 | + strategy: |
| 24 | + matrix: |
| 25 | + python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 26 | + steps: |
| 27 | + - name: 🛎️ Checkout |
| 28 | + uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: 📦 Cache Python packages |
| 31 | + uses: actions/cache@v3 |
| 32 | + with: |
| 33 | + path: ~/.cache/pip |
| 34 | + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-integration-${{ hashFiles('requirements/**') }} |
| 35 | + restore-keys: | |
| 36 | + ${{ runner.os }}-pip-${{ matrix.python-version }}- |
| 37 | +
|
| 38 | + - name: 🐍 Set up Python ${{ matrix.python-version }} |
| 39 | + uses: actions/setup-python@v5 |
| 40 | + with: |
| 41 | + python-version: ${{ matrix.python-version }} |
| 42 | + check-latest: true |
| 43 | + |
| 44 | + - name: 📦 Install dependencies |
| 45 | + run: | |
| 46 | + python -m pip install --upgrade pip |
| 47 | + pip install --upgrade setuptools |
| 48 | + pip install -r requirements/_requirements.txt \ |
| 49 | + -r requirements/requirements.sdk.http.txt \ |
| 50 | + -r requirements/requirements.test.unit.txt |
| 51 | +
|
| 52 | + - name: 🧪 Integration Tests - WebRTC SDK (mocked) |
| 53 | + timeout-minutes: 10 |
| 54 | + run: python -m pytest tests/inference_sdk/integration_tests -v |
| 55 | + |
| 56 | + e2e-tests: |
| 57 | + needs: call_is_mergeable |
| 58 | + if: ${{ github.event_name != 'pull_request' || needs.call_is_mergeable.outputs.mergeable_state != 'not_clean' }} |
| 59 | + runs-on: |
| 60 | + labels: depot-ubuntu-22.04-4 |
| 61 | + group: public-depot |
| 62 | + timeout-minutes: 30 |
| 63 | + strategy: |
| 64 | + matrix: |
| 65 | + python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 66 | + steps: |
| 67 | + - name: 🛎️ Checkout |
| 68 | + uses: actions/checkout@v4 |
| 69 | + |
| 70 | + - name: 📦 Cache Python packages |
| 71 | + uses: actions/cache@v3 |
| 72 | + with: |
| 73 | + path: ~/.cache/pip |
| 74 | + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-e2e-${{ hashFiles('requirements/**') }} |
| 75 | + restore-keys: | |
| 76 | + ${{ runner.os }}-pip-${{ matrix.python-version }}- |
| 77 | +
|
| 78 | + - name: 🐍 Set up Python ${{ matrix.python-version }} |
| 79 | + uses: actions/setup-python@v5 |
| 80 | + with: |
| 81 | + python-version: ${{ matrix.python-version }} |
| 82 | + check-latest: true |
| 83 | + |
| 84 | + - name: 📦 Install dependencies |
| 85 | + run: | |
| 86 | + python -m pip install --upgrade pip |
| 87 | + pip install --upgrade setuptools |
| 88 | + pip install -r requirements/_requirements.txt \ |
| 89 | + -r requirements/requirements.cpu.txt \ |
| 90 | + -r requirements/requirements.http.txt \ |
| 91 | + -r requirements/requirements.sdk.http.txt \ |
| 92 | + -r requirements/requirements.test.unit.txt |
| 93 | +
|
| 94 | + - name: 🧪 E2E Tests - WebRTC SDK (real server) |
| 95 | + timeout-minutes: 15 |
| 96 | + run: python -m pytest tests/inference_sdk/e2e_tests -m slow -v --timeout=120 |
0 commit comments