Add Support for Video Media #250
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: examples | |
| on: | |
| push: | |
| branches: ["main"] | |
| release: | |
| types: | |
| - created | |
| pull_request: | |
| types: [ opened, reopened, ready_for_review, synchronize ] | |
| jobs: | |
| examples: | |
| name: ${{ matrix.name }} (${{ matrix.auth_mode }}) | |
| runs-on: ${{ matrix.os }} | |
| if: github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "guest" | |
| name: "standalone_usage.py" | |
| extra_packages: "" | |
| run: "uv run python examples/standalone_usage.py" | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "user" | |
| name: "standalone_usage.py" | |
| extra_packages: "" | |
| run: "uv run python examples/standalone_usage.py" | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "guest" | |
| name: "file_media_model_usage.py" | |
| extra_packages: "" | |
| run: "uv run python examples/file_media_model_usage.py" | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "user" | |
| name: "file_media_model_usage.py" | |
| extra_packages: "" | |
| run: "uv run python examples/file_media_model_usage.py" | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "guest" | |
| name: "lightning_autoencoder.py" | |
| extra_packages: "" | |
| run: "uv run python examples/lightning_autoencoder.py" | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "user" | |
| name: "lightning_autoencoder.py" | |
| extra_packages: "" | |
| run: "uv run python examples/lightning_autoencoder.py" | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "guest" | |
| name: "complete_workflow" | |
| extra_packages: "" | |
| run: | | |
| uv run python examples/complete_workflow/train.py | |
| uv run python examples/complete_workflow/fetch.py | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "user" | |
| name: "complete_workflow" | |
| extra_packages: "" | |
| run: | | |
| uv run python examples/complete_workflow/train.py | |
| uv run python examples/complete_workflow/fetch.py | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| auth_mode: "guest" | |
| name: "litserve_inference.py" | |
| extra_packages: "litgpt litserve" | |
| run: | | |
| uv run python -c "import runpy; runpy.run_path('examples/litserve_inference.py', run_name='litserve_example_smoke')" | |
| timeout-minutes: 15 | |
| env: | |
| LIGHTNING_CLOUD_URL: https://staging.gridai.dev | |
| UV_TORCH_BACKEND: cpu | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv and setup python | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| activate-environment: true | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv sync --group tests | |
| uv pip list | |
| - name: Install example-specific dependencies | |
| if: matrix.extra_packages != '' | |
| run: uv pip install ${{ matrix.extra_packages }} | |
| - name: Enable Guest Mode | |
| if: matrix.auth_mode == 'guest' | |
| shell: bash | |
| run: echo "TEST_GUEST_MODE=1" >> $GITHUB_ENV | |
| - name: Set Auth Credentials | |
| if: matrix.auth_mode == 'user' | |
| shell: bash | |
| run: | | |
| echo "LIGHTNING_USER_ID=${{ secrets.LIGHTNING_STAGING_USER_ID }}" >> $GITHUB_ENV | |
| echo "LIGHTNING_API_KEY=${{ secrets.LIGHTNING_STAGING_API_KEY }}" >> $GITHUB_ENV | |
| - name: Run example | |
| shell: bash | |
| run: ${{ matrix.run }} | |
| guardian-examples: | |
| runs-on: ubuntu-latest | |
| needs: examples | |
| if: always() | |
| steps: | |
| - run: echo "${{ needs.examples.result }}" | |
| - name: failing... | |
| if: needs.examples.result == 'failure' | |
| run: exit 1 | |
| - name: cancelled or skipped... | |
| if: contains(fromJSON('["cancelled", "skipped"]'), needs.examples.result) | |
| timeout-minutes: 1 | |
| run: sleep 90 |