Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# Note: Faster subset of aria-tests.yml, runs on all changes
# =============================================================================

name: E2E + Integration Tests

Check warning on line 13 in .github/workflows/e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Copilot setup files & linters

13:1 [document-start] missing document start "---"

Check warning on line 13 in .github/workflows/e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Copilot setup files & linters

13:1 [document-start] missing document start "---"

on:

Check warning on line 15 in .github/workflows/e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Copilot setup files & linters

15:1 [truthy] truthy value should be one of [false, true]
push:
branches: [main]
pull_request:
Expand Down Expand Up @@ -203,7 +203,7 @@
# cspell:ignore libxss libgtk libasound libnss libatk libgbm libx
run: |
apt-get update
apt-get install -y wget gnupg ca-certificates xz-utils fonts-liberation libgtk-3-0 libxss1 libasound2 libnss3 libatk-bridge2.0-0 libx11-xcb1 libgbm1

Check warning on line 206 in .github/workflows/e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Copilot setup files & linters

206:141 [line-length] line too long (158 > 140 characters)
- name: Install Chromium (stable)
# cspell:ignore elif
run: |
Expand Down Expand Up @@ -234,10 +234,11 @@
fi
- name: Install Python test deps
# cspell:ignore asyncio pyppeteer pytest
run: python -m pip install --upgrade pip && python -m pip install pytest pytest-asyncio pyppeteer requests
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-asyncio pyppeteer requests
python -c "from pyppeteer.chromium_downloader import download_chromium; download_chromium()"
- name: Start server and run pyppeteer tests
env:
CHROME_PATH: /usr/bin/chromium
run: |
python3 aria_web/server.py > /tmp/aria_server.log 2>&1 &
READY=0
Expand Down
17 changes: 16 additions & 1 deletion tests/test_aria_tests_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,25 @@
import pytest


_DOWNLOAD_CMD = 'python -c "from pyppeteer.chromium_downloader import download_chromium; download_chromium()"'


@pytest.mark.unit
def test_pyppeteer_workflow_uses_supported_chromium_download_command() -> None:
workflow_path = Path(__file__).resolve().parents[1] / ".github" / "workflows" / "aria-tests.yml"
content = workflow_path.read_text(encoding="utf-8")

assert "python -m pyppeteer install" not in content
assert 'python -c "from pyppeteer.chromium_downloader import download_chromium; download_chromium()"' in content
assert _DOWNLOAD_CMD in content


@pytest.mark.unit
def test_e2e_tests_workflow_uses_pyppeteer_bundled_chromium() -> None:
"""e2e-tests.yml containerized_chrome job must not try to apt-install chromium."""
workflow_path = Path(__file__).resolve().parents[1] / ".github" / "workflows" / "e2e-tests.yml"
content = workflow_path.read_text(encoding="utf-8")

# Must use pyppeteer bundled download — never apt-install chromium-browser (not in Bullseye)
assert "chromium-browser" not in content
assert "python -m pyppeteer install" not in content
assert _DOWNLOAD_CMD in content
Loading