mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 18:41:50 +01:00
ci: fix linux builds
This commit is contained in:
@@ -3,7 +3,8 @@ SPDX-FileCopyrightText: © Sebastian Thomschke and contributors
|
|||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
SPDX-ArtifactOfProjectHomePage: https://github.com/Second-Hand-Friends/kleinanzeigen-bot/
|
SPDX-ArtifactOfProjectHomePage: https://github.com/Second-Hand-Friends/kleinanzeigen-bot/
|
||||||
"""
|
"""
|
||||||
import logging, os
|
import logging, os, platform
|
||||||
|
from typing import cast
|
||||||
|
|
||||||
import nodriver, pytest
|
import nodriver, pytest
|
||||||
|
|
||||||
@@ -17,6 +18,9 @@ if os.environ.get("CI"):
|
|||||||
|
|
||||||
async def atest_init() -> None:
|
async def atest_init() -> None:
|
||||||
web_scraping_mixin = WebScrapingMixin()
|
web_scraping_mixin = WebScrapingMixin()
|
||||||
|
if platform.system() == "Linux":
|
||||||
|
# required for Ubuntu 24.04 or newer
|
||||||
|
cast(list[str], web_scraping_mixin.browser_config.arguments).append("--no-sandbox")
|
||||||
|
|
||||||
browser_path = web_scraping_mixin.get_compatible_browser()
|
browser_path = web_scraping_mixin.get_compatible_browser()
|
||||||
ensure(browser_path is not None, "Browser not auto-detected")
|
ensure(browser_path is not None, "Browser not auto-detected")
|
||||||
|
|||||||
Reference in New Issue
Block a user