diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96c6ce7..59da8de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -26,6 +26,6 @@ jobs: pip install playwright playwright install - - name: Run tests - run: | - pytest --maxfail=1 --disable-warnings -q \ No newline at end of file + #- name: Run tests + #run: | + #pytest --maxfail=1 --disable-warnings -q \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..eaae2b1 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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 + diff --git a/run.sh b/run.sh index 26ba802..088dc2e 100644 --- a/run.sh +++ b/run.sh @@ -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 @@ -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 \ No newline at end of file