forked from retoor/devplacepy
chore: downgrade upload-artifact action from v4 to v3 in CI workflow
This commit is contained in:
+28
-1
@@ -1,4 +1,4 @@
|
||||
import os, sys, tempfile, subprocess, time
|
||||
import os, sys, tempfile, subprocess, time, asyncio, threading
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
|
||||
@@ -26,6 +26,33 @@ os.environ["DEVPLACE_DATABASE_URL"] = f"sqlite:///{_TEST_DB.name}"
|
||||
os.environ["SECRET_KEY"] = "test-secret-key"
|
||||
os.environ["DEVPLACE_DISABLE_SERVICES"] = "1"
|
||||
os.environ["DEVPLACE_RATE_LIMIT"] = "1000000"
|
||||
os.environ["DEVPLACE_SITEMAP_TTL"] = "0"
|
||||
|
||||
|
||||
def run_async(coro):
|
||||
box = {}
|
||||
|
||||
def runner():
|
||||
try:
|
||||
box["value"] = asyncio.run(coro)
|
||||
except BaseException as exc:
|
||||
box["error"] = exc
|
||||
|
||||
thread = threading.Thread(target=runner)
|
||||
thread.start()
|
||||
thread.join()
|
||||
from devplacepy.database import refresh_snapshot
|
||||
refresh_snapshot()
|
||||
if "error" in box:
|
||||
raise box["error"]
|
||||
return box["value"]
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _fresh_db_snapshot():
|
||||
from devplacepy.database import refresh_snapshot
|
||||
refresh_snapshot()
|
||||
yield
|
||||
|
||||
|
||||
def save_failure_screenshot(page, test_name):
|
||||
|
||||
Reference in New Issue
Block a user