Skip to content

Commit 0fe1f8e

Browse files
committed
add actions
adding yml
1 parent d49e200 commit 0fe1f8e

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# PythonTesting
2+
Practice Pytest
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Playwright Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test_ui:
11+
timeout-minutes: 60
12+
runs-on: windows-latest # Use Windows runner
13+
14+
steps:
15+
# Checkout the repository
16+
- uses: actions/checkout@v4
17+
18+
# Set up Python
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12" # Specify the Python version you need
23+
24+
# Install dependencies
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pytest playwright
29+
30+
# Install Playwright browsers
31+
- name: Install Playwright browsers
32+
run: playwright install --with-deps
33+
34+
# Run Playwright tests
35+
- name: Run Playwright tests
36+
run: pytest tests/ # Replace `tests/` with the directory containing your tests
37+
38+
# Upload test report (if applicable)
39+
- uses: actions/upload-artifact@v4
40+
if: always()
41+
with:
42+
name: playwright-report
43+
path: playwright-report/ # Ensure your tests generate a report in this directory
44+
retention-days: 30

0 commit comments

Comments
 (0)