Enable quick-start-app-e2e (#14542)
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
This commit is contained in:
parent
6edf5c5cc2
commit
b0bd949d58
|
@ -43,7 +43,7 @@ jobs:
|
|||
pool: azure-cpus
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright/python:v1.25.2-focal
|
||||
options: "--shm-size=2g"
|
||||
options: "--shm-size=4gb"
|
||||
strategy:
|
||||
matrix:
|
||||
'App: v0_app':
|
||||
|
@ -68,6 +68,8 @@ jobs:
|
|||
name: "payload"
|
||||
'App: commands_and_api':
|
||||
name: "commands_and_api"
|
||||
'App: quick_start':
|
||||
name: "quick_start"
|
||||
timeoutInMinutes: "30"
|
||||
cancelTimeoutInMinutes: "2"
|
||||
# values: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#workspace
|
||||
|
@ -87,6 +89,7 @@ jobs:
|
|||
displayName: 'Info'
|
||||
|
||||
- task: Cache@2
|
||||
condition: ne(variables['name'], 'quick_start')
|
||||
inputs:
|
||||
key: 'pip | "$(name)" | requirements/app/base.txt'
|
||||
restoreKeys: |
|
||||
|
@ -94,9 +97,10 @@ jobs:
|
|||
path: $(pip_cache_dir)
|
||||
displayName: Cache pip
|
||||
|
||||
- bash: python -m pip install -r requirements/app/devel.txt --quiet --find-links ${TORCH_URL}
|
||||
env:
|
||||
TORCH_URL: https://download.pytorch.org/whl/cpu/torch_stable.html
|
||||
- bash: python -m pip install -e . --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
|
||||
displayName: 'Install lightning'
|
||||
|
||||
- bash: python -m pip install -r requirements/app/test.txt -r requirements/app/ui.txt
|
||||
displayName: 'Install dependencies'
|
||||
|
||||
- bash: |
|
||||
|
@ -104,9 +108,6 @@ jobs:
|
|||
python -m playwright install # --with-deps
|
||||
displayName: 'Install Playwright system dependencies'
|
||||
|
||||
- bash: pip install -e . --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
|
||||
displayName: 'Install lightning'
|
||||
|
||||
- bash: |
|
||||
rm -rf examples/app_template_jupyterlab || true
|
||||
git clone https://github.com/Lightning-AI/LAI-lightning-template-jupyterlab-App examples/app_template_jupyterlab
|
||||
|
@ -120,11 +121,20 @@ jobs:
|
|||
condition: eq(variables['name'], 'template_react_ui')
|
||||
displayName: 'Clone Template React UI Repo'
|
||||
|
||||
- bash: python -m lightning install app lightning/quick-start -y
|
||||
condition: eq(variables['name'], 'quick_start')
|
||||
displayName: 'Install Quick Start'
|
||||
|
||||
- bash: |
|
||||
pip --version
|
||||
pip list
|
||||
displayName: 'List pip dependency'
|
||||
|
||||
- bash: |
|
||||
mkdir -p ${VIDEO_LOCATION}
|
||||
ls -l examples/${TEST_APP_NAME}
|
||||
ls -l tests/tests_app_examples
|
||||
python -m pytest tests/tests_app_examples/test_${TEST_APP_NAME}.py::test_${TEST_APP_NAME}_example_cloud --timeout=900 --capture=no -v --color=yes
|
||||
python -m pytest tests/tests_app_examples/test_${TEST_APP_NAME}.py::test_${TEST_APP_NAME}_example_cloud --timeout=1200 --capture=no -v --color=yes
|
||||
env:
|
||||
HEADLESS: '1'
|
||||
PACKAGE_LIGHTNING: '1'
|
||||
|
|
|
@ -9,3 +9,4 @@ httpx
|
|||
trio
|
||||
pympler
|
||||
psutil
|
||||
setuptools<=59.5.0
|
||||
|
|
|
@ -420,6 +420,7 @@ def run_app_in_cloud(
|
|||
|
||||
context.close()
|
||||
browser.close()
|
||||
Popen("lightning disconnect", shell=True).wait()
|
||||
|
||||
|
||||
def wait_for(page, callback: Callable, *args, **kwargs) -> Any:
|
||||
|
|
|
@ -55,7 +55,7 @@ def test_quick_start_example_cloud() -> None:
|
|||
|
||||
def click_gradio_demo(*_, **__):
|
||||
button = view_page.locator('button:has-text("Interactive demo")')
|
||||
button.wait_for(timeout=3 * 1000)
|
||||
button.wait_for(timeout=5 * 1000)
|
||||
button.click()
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue