Skip to content
Merged
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # use your Python version
python-version: '3.11'

- name: Install dependencies
run: |
Expand All @@ -26,6 +26,6 @@ jobs:
pip install playwright
playwright install

- name: Run tests
run: |
pytest --maxfail=1 --disable-warnings -q
#- name: Run tests
#run: |
#pytest --maxfail=1 --disable-warnings -q
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test Run

on:
workflow_dispatch:
inputs:
test_class:
description: 'Test class or file to run (e.g., tests/test_example.py::TestClassName)'
required: false
default: ''

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install allure-pytest
pip install playwright
playwright install

- name: Run tests
run: bash ./run.sh

6 changes: 4 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DEBUG=${DEBUG:-0}
ALLURE=${ALLURE:-1}

rm -rf allure-results
rm -rf allure-results allure-report

if [ "$DEBUG" -eq 1 ]; then
export PWDEBUG=1
Expand All @@ -12,5 +12,7 @@ python -m pytest --alluredir=allure-results "$@"

if [ "$ALLURE" -eq 1 ]; then
allure generate allure-results -o allure-report --clean
allure open allure-report
if [ -z "$CI" ]; then
allure open allure-report
fi
fi