diff --git a/.gitea/workflows/publish-pytest-result b/.gitea/workflows/publish-pytest-result new file mode 100644 index 0000000..bc6a216 --- /dev/null +++ b/.gitea/workflows/publish-pytest-result @@ -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 \ No newline at end of file