Update pillow to 12.1.1 and streamlit to 1.54.0 for security and comp… #1907
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: Sanity check (demos) | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| pull_request: | |
| branches: [master] | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| find-subprojects: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| gradio: ${{ steps.categorize-subprojects.outputs.gradio }} | |
| webcam: ${{ steps.categorize-subprojects.outputs.webcam }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine subprojects to test | |
| id: find-updates | |
| uses: ./.github/reusable-steps/find-updates | |
| with: | |
| dir: demos | |
| ci_config_file: sanity-check-demos.yml | |
| - name: Categorize subprojects | |
| id: categorize-subprojects | |
| uses: ./.github/reusable-steps/categorize-projects | |
| with: | |
| subprojects: ${{ steps.find-updates.outputs.subproject_dirs }} | |
| gradio: | |
| needs: find-subprojects | |
| if: ${{ needs.find-subprojects.outputs.gradio != '[]' }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025] | |
| python: ["3.10", "3.13"] | |
| subproject: ${{ fromJson(needs.find-subprojects.outputs.gradio) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/reusable-steps/setup-os | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - uses: ./.github/reusable-steps/setup-python | |
| with: | |
| python: ${{ matrix.python }} | |
| project: ${{ matrix.subproject }} | |
| - uses: ./.github/reusable-steps/setup-hugging-face | |
| with: | |
| hf_token: ${{ secrets.HF_TOKEN }} | |
| - uses: ./.github/reusable-steps/gradio-action | |
| timeout-minutes: 30 | |
| with: | |
| script: main.py | |
| project: ${{ matrix.subproject }} | |
| args: ${{ contains(matrix.os, 'arm') && '--chat_model=meta-llama/Llama-3.2-1B-Instruct' || '' }} | |
| webcam: | |
| needs: find-subprojects | |
| if: ${{ needs.find-subprojects.outputs.webcam != '[]' }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025] | |
| python: ["3.10", "3.13"] | |
| subproject: ${{ fromJson(needs.find-subprojects.outputs.webcam) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/reusable-steps/setup-os | |
| - uses: ./.github/reusable-steps/setup-python | |
| with: | |
| python: ${{ matrix.python }} | |
| project: ${{ matrix.subproject }} | |
| - name: Run Webcam Demo | |
| shell: bash | |
| timeout-minutes: 30 | |
| run: | | |
| cd ${{ matrix.subproject }} | |
| # linux requires a virtual display | |
| if [ "${{ runner.os }}" == "Linux" ]; then | |
| xvfb-run python main.py --stream sample_video.mp4 | |
| else | |
| python main.py --stream sample_video.mp4 | |
| fi |