1- name : " Copilot: Generate and Run Playwright Tests Until Passing "
1+ name : " DEPRECATED: Copilot Playwright Auto Tests (legacy) "
22
33on :
4- push :
5- branches :
6- - main
7- - master
4+ workflow_dispatch :
85
96jobs :
10- generate-and-test :
7+ deprecated :
118 runs-on : ubuntu-latest
129 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 : Copilot Generate Playwright Scripts
31- uses : github/copilot-agent/playwright-generate@main # Example, customize for Python; or use Chat to generate script
32- with :
33- github-token : ${{ secrets.GITHUB_TOKEN }}
34- prompt : " Generate Playwright test scripts covering every user action on this web app."
35- continue-on-error : true # If your agent doesn't support, replace with python script generation using Copilot Chat
36-
37- - name : Run Playwright Tests
10+ - name : Notice
3811 run : |
39- pytest tests/ # Or the path to your Playwright scripts
40-
41- - name : If Tests Fail, Copilot Attempts Fix & Repeats
42- uses : github/copilot-agent/playwright-fix-and-loop@main # Example, requires agent loop feature
43- with :
44- github-token : ${{ secrets.GITHUB_TOKEN }}
45- max_attempts : 5
46- continue-on-error : true
47-
48- - name : Create PR with passing tests or attempted fixes
49- uses : peter-evans/create-pull-request@main
50- with :
51- branch : " copilot/playwright-auto-tests"
52- title : " Copilot generated Playwright tests (auto-fixed)"
53- body : " Automated Playwright test generation/fix by Copilot agent."
54- commit-message : " Copilot agent Playwright tests and fixes"
55- continue-on-error : true
56-
57- - name : Auto-merge if passing
58- uses : pascalgn/automerge-action@main
59- with :
60- merge-method : squash
61- github-token : ${{ secrets.GITHUB_TOKEN }}
62- continue-on-error : true
12+ echo "This legacy workflow referenced non-existent Copilot agent actions."
13+ echo "Use auto-copilot-org-playwright-loopv2.yml instead."
0 commit comments