Skip to content

Merge branch 'main' of https://github.com/chalasanim/PythonTesting #3

Merge branch 'main' of https://github.com/chalasanim/PythonTesting

Merge branch 'main' of https://github.com/chalasanim/PythonTesting #3

name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test_ui:
timeout-minutes: 60
runs-on: windows-latest # Use Windows runner
steps:
# Checkout the repository
- uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12" # Specify the Python version you need
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest playwright
# Install Playwright browsers
- name: Install Playwright browsers
run: playwright install --with-deps
# Run Playwright tests
- name: Run Playwright tests
run: pytest tests/ # Replace `tests/` with the directory containing your tests
# Upload test report (if applicable)
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/ # Ensure your tests generate a report in this directory
retention-days: 30