ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
github-native / gitea-pending (push) Skipped
github-native / darwin amd64 native (push) Skipped
github-native / linux amd64 native (push) Skipped
github-native / windows amd64 native (push) Skipped
github-native / darwin arm64 native (push) Skipped
github-native / gitea-result (push) Skipped
ci / checks (push) Failing after 23s
ci / native-authoring (push) Skipped
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 11m23s
ci / release (push) Skipped
ci-platforms / darwin amd64 smoke (push) Skipped
32 lines
1.3 KiB
Python
32 lines
1.3 KiB
Python
"""Smoke the image's two real browser executables using an isolated display."""
|
|
|
|
from playwright.sync_api import sync_playwright
|
|
|
|
|
|
def main():
|
|
print('browser smoke: starting Playwright driver', flush=True)
|
|
with sync_playwright() as playwright:
|
|
for name in ('chromium', 'firefox'):
|
|
print(name + ': launching', flush=True)
|
|
browser_type = getattr(playwright, name)
|
|
options = {'headless': False, 'timeout': 30000}
|
|
if name == 'chromium':
|
|
options['args'] = ['--no-sandbox']
|
|
browser = browser_type.launch(**options)
|
|
try:
|
|
print(name + ': rendering', flush=True)
|
|
page = browser.new_page()
|
|
page.set_default_timeout(30000)
|
|
page.set_content('<title>Aego CI environment</title><p>ready</p>', timeout=30000)
|
|
if page.title() != 'Aego CI environment' or page.locator('p').inner_text() != 'ready':
|
|
raise RuntimeError(name + ' did not render the smoke page')
|
|
print(name + ': browser smoke passed', flush=True)
|
|
finally:
|
|
print(name + ': closing', flush=True)
|
|
browser.close()
|
|
print('browser smoke: driver closed', flush=True)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|