Skip to content

Commit 28bc67d

Browse files
committed
add autobot
1 parent 220c054 commit 28bc67d

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@v1
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
log_path: error.log
52+
screenshot_path: screenshot.png

perekrestok_api/manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ async def _warmup(self) -> None:
9292
self.session = HumanBrowser.replace(br)
9393
self.ctx = await self.session.new_context()
9494
self.page = await self.ctx.new_page()
95+
self.page.on_error_screenshot_path = "screenshot.png"
9596

9697
sniffer = HeaderAnomalySniffer(
9798
include_subresources=True, # или False, если интересны только документы

0 commit comments

Comments
 (0)