Skip to content

Python Autotests

Python Autotests #10

Workflow file for this run

name: Python Autotests
on:
workflow_dispatch:
inputs:
deployment_target:
description: Choose tests set
required: true
type: choice
default: smoke
options:
- smoke
- regression
- all
jobs:
run-tests:
runs-on: ubuntu-latest
name: Run Selenium UI Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: '3.11.1'
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Start Selenium Chrome service
uses: GabrielBB/xvfb-action@v1
with:
run: |
pytest --disable-warnings --alluredir=allure-results
- name: Run all tests
if: "github.event.inputs.deployment_target == 'all'"
run: |
pytest --disable-warnings --alluredir=allure-results
- name: Run smoke tests
if: "github.event.inputs.deployment_target == 'smoke'"
run: |
pytest -m smoke --disable-warnings --alluredir=allure-results
- name: Run regression tests
if: "github.event.inputs.deployment_target == 'regression'"
run: |
pytest -m regression --disable-warnings --alluredir=allure-results
- name: Upload allure results
uses: actions/upload-artifact@v3
with:
name: allure-results
path: allure-results