Skip to content

Commit 84d9a63

Browse files
committed
авто отслеживание инцидентов
1 parent 84eae60 commit 84d9a63

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,13 @@ jobs:
4040
4141
- name: Run tests (venv)
4242
run: |
43-
venv/bin/python -m pytest --tb=short
43+
set -o pipefail
44+
venv/bin/python -m pytest --tb=short 2>&1 | tee error.log
45+
46+
- name: report playwright failure
47+
if: failure()
48+
uses: Miskler/human-requests-bot@v9
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
log_path: error.log
52+
screenshot_path: screenshot.png

chizhik_api/manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ async def _warmup(self) -> None:
7979
self.session = HumanBrowser.replace(br)
8080
self.ctx = await self.session.new_context()
8181
self.page = await self.ctx.new_page()
82+
self.page.on_error_screenshot_path = "screenshot.png"
8283
await self.page.goto(self.CATALOG_URL, wait_until="networkidle")
8384

8485
ok = False

0 commit comments

Comments
 (0)