Skip to content

integrate enterprise logging and allure reporting #11

integrate enterprise logging and allure reporting

integrate enterprise logging and allure reporting #11

Workflow file for this run

name: CI Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
browser:
description: "Browser to run tests"
required: true
default: "chrome"
type: choice
options:
- chrome
- firefox
- edge
environment:
description: "Target environment"
required: true
default: "qa"
type: choice
options:
- dev
- qa
- staging
markers:
description: "Test markers to run"
required: true
default: "smoke"
type: choice
options:
- smoke
- regression
- sanity
- e2e
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Chrome
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- name: Run tests
run: |
pytest -v \
--browser=${{ github.event.inputs.browser || 'chrome' }} \
--env=${{ github.event.inputs.environment || 'qa' }} \
--headless \
-m "${{ github.event.inputs.markers || 'smoke' }}" \
--html=reports/ci_report.html \
--self-contained-html
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: test-report
path: reports/
- name: Upload screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: failure-screenshots
path: screenshots/