31 lines
722 B
Plaintext
31 lines
722 B
Plaintext
name: Run UI Tests and Publish HTML Report
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
ui-test:
|
|
runs-on: [docker]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get update && apt-get install -y chromium-driver firefox-esr
|
|
pip install --no-cache-dir selenium pytest pytest-html
|
|
|
|
- name: Run pytest (generate HTML report)
|
|
run: |
|
|
mkdir -p reports
|
|
pytest tests/ --html=reports/report.html --self-contained-html
|
|
|
|
- name: Upload HTML Report
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: pytest-report
|
|
path: reports/report.html |