Skip to content

Commit 915b46b

Browse files
committed
Sync auto-copilot-org-playwright-loopv2.yaml from .github repo
1 parent e3c3e51 commit 915b46b

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "Org-wide: Copilot Playwright Test, Review, Auto-fix, PR, Merge"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
playwright-review-fix:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@main
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@main
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install dependencies
22+
run: |
23+
pip install -r requirements.txt
24+
pip install pytest playwright pytest-playwright
25+
26+
- name: Install Playwright browsers
27+
run: |
28+
python -m playwright install
29+
30+
- name: Run Playwright Tests
31+
run: |
32+
pytest tests/ || exit 1
33+
continue-on-error: true
34+
35+
- name: Copilot PR Agent Review
36+
uses: github/copilot-agent/pr@main
37+
with:
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
continue-on-error: true
40+
41+
- name: Copilot Auto-fix Failing Playwright Tests
42+
uses: github/copilot-agent/fix@main
43+
with:
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
45+
max_attempts: 3
46+
continue-on-error: true
47+
48+
- name: Create Pull Request for Automated Fixes
49+
uses: peter-evans/create-pull-request@main
50+
with:
51+
branch: "copilot/playwright-fixes"
52+
title: "Copilot: Auto-fix Playwright Tests"
53+
body: "Automated Playwright test fixes by Copilot Agent."
54+
commit-message: "Copilot agent Playwright bugfixes"
55+
continue-on-error: true
56+
57+
- name: Automerge PR if checks pass
58+
uses: pascalgn/automerge-action@main
59+
with:
60+
merge-method: squash
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
continue-on-error: true

0 commit comments

Comments
 (0)