Adds "Running Code" loading indicator #1018
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: Test - Mito AI Frontend Playwright with LLM Providers | |
| on: | |
| push: | |
| branches: [ dev ] | |
| paths: | |
| - 'mito-ai/**' | |
| - 'tests/llm_providers_tests/**' | |
| - '.github/workflows/test-llm-providers.yml' | |
| pull_request: | |
| paths: | |
| - 'mito-ai/**' | |
| - 'tests/llm_providers_tests/**' | |
| - '.github/workflows/test-llm-providers.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-mitoai-frontend-jupyterlab-llm-providers: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12'] | |
| use-mito-ai-server: [true, false] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| mito-ai/setup.py | |
| tests/requirements.txt | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| cache-dependency-path: mito-ai/package-lock.json | |
| - name: Upgrade pip | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Install dependencies | |
| run: | | |
| cd tests | |
| bash mac-setup.sh | |
| - name: Install JupyterLab | |
| run: | | |
| python -m pip install jupyterlab | |
| - name: Install Node.js dependencies | |
| run: | | |
| cd mito-ai | |
| jlpm install | |
| - name: Setup JupyterLab | |
| run: | | |
| cd tests | |
| source venv/bin/activate | |
| pip install setuptools==68.0.0 | |
| cd ../mito-ai | |
| jupyter labextension develop . --overwrite | |
| jupyter server extension enable --py mito_ai | |
| - name: Start a server and run LLM provider tests | |
| run: | | |
| cd tests | |
| source venv/bin/activate | |
| jupyter lab --config jupyter_server_test_config.py & | |
| jlpm run test:llm-providers | |
| env: | |
| GEMINI_API_KEY: ${{ matrix.use-mito-ai-server == false && secrets.GEMINI_API_KEY || '' }} | |
| ANTHROPIC_API_KEY: ${{ matrix.use-mito-ai-server == false && secrets.ANTHROPIC_API_KEY || '' }} | |
| OPENAI_API_KEY: ${{ matrix.use-mito-ai-server == false && secrets.OPENAI_API_KEY || '' }} | |
| - name: Upload test-results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: mitoai-jupyterlab-playwright-llm-providers-report-${{ matrix.python-version }}-${{ matrix.use-mito-ai-server }}-${{ github.run_id }} | |
| path: tests/playwright-report/ | |
| retention-days: 14 |