ci: enable Playwright browser tests in GitHub Actions
The GITHUB_ACTIONS skip was added before Playwright automation existed, when tests required manual browser interaction. Now that Playwright handles the OAuth flow programmatically, the skip is unnecessary — GitHub Actions fully supports Playwright with localhost networking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,8 +76,6 @@ jobs:
|
||||
needs-playwright: true
|
||||
extra-args: ""
|
||||
|
||||
# NOTE: Playwright browser tests are skipped in CI (no browser grant flow).
|
||||
# These entries still run non-Playwright tests marked with the same markers.
|
||||
- mode: oauth
|
||||
profile: oauth
|
||||
markers: "oauth and not keycloak"
|
||||
@@ -199,15 +197,6 @@ jobs:
|
||||
--timeout=300 \
|
||||
${{ matrix.extra-args }}
|
||||
|
||||
- name: Report skipped Playwright tests
|
||||
if: matrix.needs-playwright
|
||||
run: |
|
||||
echo "::notice::Playwright browser tests are skipped in CI. Run locally with: uv run pytest -m '${{ matrix.markers }}' --browser firefox"
|
||||
uv run pytest --collect-only -q \
|
||||
-m '${{ matrix.markers }}' \
|
||||
${{ matrix.extra-args }} 2>/dev/null \
|
||||
| tail -1 || true
|
||||
|
||||
- name: Collect service logs on failure
|
||||
if: failure()
|
||||
run: docker compose --profile ${{ matrix.profile }} logs --tail=500 > /tmp/docker-compose-logs.txt 2>&1
|
||||
|
||||
@@ -1109,13 +1109,6 @@ def oauth_callback_server():
|
||||
|
||||
The server automatically shuts down when the fixture is torn down.
|
||||
"""
|
||||
# FIXME: Playwright browser automation has issues with the localhost
|
||||
# callback server in GitHub Actions CI. Address in a follow-up PR.
|
||||
if os.getenv("GITHUB_ACTIONS"):
|
||||
pytest.skip(
|
||||
"OAuth tests with browser automation not supported in GitHub Actions CI"
|
||||
)
|
||||
|
||||
# Use a dict to store auth codes keyed by state parameter
|
||||
# This allows multiple concurrent OAuth flows
|
||||
auth_states = {}
|
||||
|
||||
@@ -113,13 +113,6 @@ async def login_flow_oauth_token(
|
||||
Uses Playwright browser automation to complete the OAuth flow against
|
||||
Nextcloud, obtaining a token suitable for the port 8004 MCP session.
|
||||
"""
|
||||
# FIXME: Playwright browser automation has issues with the localhost
|
||||
# callback server in GitHub Actions CI. Address in a follow-up PR.
|
||||
if os.getenv("GITHUB_ACTIONS"):
|
||||
pytest.skip(
|
||||
"Login Flow tests with browser automation not supported in GitHub Actions CI"
|
||||
)
|
||||
|
||||
nextcloud_host = os.getenv("NEXTCLOUD_HOST")
|
||||
username = os.getenv("NEXTCLOUD_USERNAME")
|
||||
password = os.getenv("NEXTCLOUD_PASSWORD")
|
||||
|
||||
Reference in New Issue
Block a user