Enable quick start e2e test again and run on cloud without installing dependencies 😎 (#15546)

* Enable quick start e2e test to run without installing dependencies
* yaml formatting
* clone the repo
This commit is contained in:
Mansy 2022-11-08 17:47:38 +01:00 committed by GitHub
parent bc2cf451ee
commit 3247054067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 16 deletions

View File

@ -73,8 +73,8 @@ jobs:
name: "payload"
'App: commands_and_api':
name: "commands_and_api"
# 'App: quick_start': # TODO: Failed during installation
# name: "quick_start"
'App: quick_start':
name: "quick_start"
timeoutInMinutes: "20"
cancelTimeoutInMinutes: "2"
# values: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#workspace
@ -94,15 +94,6 @@ jobs:
pip --version
displayName: 'Info'
- task: Cache@2
condition: ne(variables['name'], 'quick_start')
inputs:
key: 'pip | "$(name)" | requirements/app/base.txt'
restoreKeys: |
pip | "$(Agent.OS)"
path: $(pip_cache_dir)
displayName: Cache pip
# TODO: we are testing it as `lightning`, so add also version for `lightning_app`
- bash: git restore . && python -m pip install -e . -r requirements/app/test.txt -r requirements/app/ui.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
displayName: 'Install Lightning & dependencies'
@ -112,6 +103,16 @@ jobs:
python -m playwright install # --with-deps
displayName: 'Install Playwright system dependencies'
# The magic happens here it doesn't need to install the quick start dependencies.
# This test is very important to test the main user story of lightning app.
# It also e2e tests running on cloud without installing dependencies.
- bash: |
rm -rf examples/lightning-quick-start || true
git clone https://github.com/Lightning-AI/lightning-quick-start examples/lightning-quick-start
condition: eq(variables['name'], 'quick_start')
displayName: 'Clone Quick start Repo'
# - bash: |
# rm -rf examples/app_template_jupyterlab || true
# git clone https://github.com/Lightning-AI/LAI-lightning-template-jupyterlab-App examples/app_template_jupyterlab
@ -125,10 +126,6 @@ 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: python -m pip install -q -r .actions/requirements.txt
displayName: 'Install assistant dependencies'

View File

@ -51,7 +51,7 @@ def test_quick_start_example(caplog, monkeypatch):
@pytest.mark.cloud
def test_quick_start_example_cloud() -> None:
with run_app_in_cloud(os.path.join(_PROJECT_ROOT, "lightning-quick-start/")) as (_, view_page, _, _):
with run_app_in_cloud(os.path.join(_PROJECT_ROOT, "examples", "lightning-quick-start/")) as (_, view_page, _, _):
def click_gradio_demo(*_, **__):
button = view_page.locator('button:has-text("Interactive demo")')