use wheels in e2e test #1325
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build-rtc: | |
| name: Build livekit-rtc wheel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.9" | |
| - name: Install cibuildwheel | |
| run: python3 -m pip install cibuildwheel==2.17.0 | |
| - name: Build wheel | |
| working-directory: ./livekit-rtc | |
| run: python3 -m cibuildwheel --output-dir dist | |
| env: | |
| CIBW_ARCHS: x86_64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rtc-wheel | |
| path: livekit-rtc/dist/*.whl | |
| tests: | |
| name: Run tests (Python ${{ matrix.python-version }}) | |
| needs: build-rtc | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| lfs: true | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Download livekit-rtc wheel | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: rtc-wheel | |
| path: rtc-wheel | |
| - name: Create venv and install dependencies | |
| run: | | |
| uv venv .test-venv | |
| source .test-venv/bin/activate | |
| uv pip install rtc-wheel/*.whl ./livekit-api ./livekit-protocol | |
| uv pip install pytest pytest-asyncio numpy matplotlib | |
| - name: Run tests | |
| env: | |
| LIVEKIT_URL: ${{ secrets.LIVEKIT_URL }} | |
| LIVEKIT_API_KEY: ${{ secrets.LIVEKIT_API_KEY }} | |
| LIVEKIT_API_SECRET: ${{ secrets.LIVEKIT_API_SECRET }} | |
| run: | | |
| source .test-venv/bin/activate | |
| pytest tests/ | |