This commit is contained in:
34
.gitea/workflows/publish-pytest-result
Normal file
34
.gitea/workflows/publish-pytest-result
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Run UI Tests and Publish HTML Report
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
ui-test:
|
||||
runs-on: [docker]
|
||||
|
||||
container:
|
||||
image: python:3.11-slim
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user