Skip to content

Commit

Permalink
Version 3.0.0 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirPodolian authored Jan 13, 2025
1 parent d38cdbc commit b0c22ee
Show file tree
Hide file tree
Showing 143 changed files with 2,969 additions and 754 deletions.
23 changes: 7 additions & 16 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
name: 'Setup Environment'
description: 'Set up tests and extract tox environment variable'
description: 'Set up tests environment'

inputs:
python-version:
description: 'Python version for tox environment'
description: 'Python version'
required: true

outputs:
tox-env:
description: 'Extracted tox environment variable'
value: ${{ steps.extract-tox-env.outputs.tox_env }}

runs:
using: 'composite'
steps:
Expand All @@ -20,15 +15,11 @@ runs:
with:
python-version: ${{ inputs.python-version }}

- name: Setup Tox
shell: bash
run: |
python -m pip install --upgrade pip
pip install tox==3.28.0
- name: Install uv
uses: astral-sh/setup-uv@v5.1.0

- name: Extract tox env
id: extract-tox-env
- name: Install dev dependencies from pyproject.toml
shell: bash
run: |
tox_env_variable=$(echo "${{ inputs.python-version }}" | sed -E 's/^([0-9]+)\.([0-9]+)(\..*)?/\1\2/')
echo "tox_env=${tox_env_variable}" >> $GITHUB_OUTPUT
uv venv
uv sync --all-extras --dev
7 changes: 2 additions & 5 deletions .github/actions/teardown/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ inputs:
browser-name:
description: 'Browser name used in tests'
required: true
tox-env:
description: 'Tox environment variable'
required: true
engine:
description: 'Tests engine'
description: 'Tests framework'
required: true

runs:
Expand All @@ -18,7 +15,7 @@ runs:
- name: Upload Allure Report as Artifact
uses: actions/upload-artifact@v4
with:
name: allure-report-${{ inputs.browser-name }}-${{ inputs.engine }}-${{ inputs.tox-env }}
name: allure-report-${{ inputs.browser-name }}-${{ inputs.engine }}
path: allure-report
retention-days: 1

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/appium_android_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- 'tests/static_tests/**'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- '.gitignore'

jobs:
android-tests:
Expand All @@ -28,8 +35,6 @@ jobs:
npm install -g npm@10.9.0
npm install -g appium@2.14.0
appium driver install uiautomator2@3.9.0
# npm install -g appium-doctor # Uncomment for debug
# appium-doctor # Uncomment for debug
- name: Start Appium Server in the Background
run: |
Expand All @@ -47,7 +52,7 @@ jobs:
id: tests
continue-on-error: true
with:
script: tox -e py38-android-web -- -v --alluredir=allure-report -m='not low' --reruns=2
script: uv run --no-config pytest tests/web_tests --platform android --driver chrome -v --alluredir=allure-report --reruns=2 -m='not low'
api-level: 33
target: google_apis
arch: x86_64
Expand All @@ -58,5 +63,4 @@ jobs:
uses: ./.github/actions/teardown
with:
browser-name: "chrome"
tox-env: "38"
engine: "appium"
10 changes: 8 additions & 2 deletions .github/workflows/appium_ios_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- 'tests/static_tests/**'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- '.gitignore'

jobs:
ios-tests:
Expand Down Expand Up @@ -36,13 +43,12 @@ jobs:
- name: Run Appium Safari tests
id: tests
run: |
tox -e py38-ios-web -- -v --alluredir=allure-report -m='not low' --reruns=2
uv run --no-config pytest tests/web_tests --platform ios --driver safari -v --alluredir=allure-report --reruns=2 -m='not low'
continue-on-error: true

- name: Teardown (Allure Report and Error Handling)
if: ${{ steps.tests.outcome == 'failure' }}
uses: ./.github/actions/teardown
with:
browser-name: "safari"
tox-env: "38"
engine: "appium"
10 changes: 8 additions & 2 deletions .github/workflows/playwright_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- 'tests/static_tests/**'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- '.gitignore'

jobs:
playwright-docker:
Expand Down Expand Up @@ -38,13 +45,12 @@ jobs:
- name: Run Playwright ${{ matrix.browser-name }} tests with py${{ matrix.python-version }}
id: tests
run: |
tox -e py${{ steps.setup.outputs.tox-env }}-playwright-${{ matrix.browser-name }} -- --headless -v --alluredir=allure-report --reruns=2
uv run --no-config pytest tests/web_tests --platform playwright --driver ${{ matrix.browser-name }} --headless -v --alluredir=allure-report --reruns=2
continue-on-error: true

- name: Teardown (Allure Report and Error Handling)
if: ${{ steps.tests.outcome == 'failure' }}
uses: ./.github/actions/teardown
with:
browser-name: ${{ matrix.browser-name }}
tox-env: ${{ steps.setup.outputs.tox-env }}
engine: "playwright"
28 changes: 28 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish to PyPI

on:
push:
branches:
- master

jobs:
publish:
name: Upload to PyPI
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Environment
id: setup
uses: ./.github/actions/setup
with:
python-version: '3.8'

- name: Build package
run: uv build

- name: Publish package to PyPI
run: |
uv publish --token ${{ secrets.PYPI_API_TOKEN }}
18 changes: 9 additions & 9 deletions .github/workflows/selenium_safari_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ name: Selenium Safari Tests
on:
push:
branches:
- '**' # Trigger on push to any branch

- '**'
paths-ignore:
- 'docs/**'
- 'tests/static_tests'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- '.gitignore'
jobs:
selenium-safari:
runs-on: macos-13
Expand All @@ -24,21 +30,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Enable Safari Remote Automation
run: |
safaridriver --version
sudo safaridriver --enable
- name: Run Selenium Safari tests with py${{ matrix.python-version }}
id: tests
run: |
tox -e py${{ steps.setup.outputs.tox-env }}-selenium-safari -- -v --alluredir=allure-report --reruns=2 -m='not low'
uv run --no-config pytest tests/web_tests --platform selenium --driver safari -v --alluredir=allure-report --reruns=2 -m='not low'
continue-on-error: true

- name: Teardown (Allure Report and Error Handling)
if: ${{ steps.tests.outcome == 'failure' }}
uses: ./.github/actions/teardown
with:
browser-name: "safari"
tox-env: ${{ steps.setup.outputs.tox-env }}
engine: "selenium"
12 changes: 9 additions & 3 deletions .github/workflows/selenium_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ name: Selenium Selenoid Tests
on:
push:
branches:
- '**' # Trigger on push to any branch
- '**'
paths-ignore:
- 'docs/**'
- 'tests/static_tests/**'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- '.gitignore'

jobs:
selenium-selenoid:
Expand Down Expand Up @@ -40,13 +47,12 @@ jobs:
- name: Run Selenium ${{ env.BROWSER }} tests with py${{ matrix.python-version }}
id: tests
run: |
tox -e py${{ steps.setup.outputs.tox-env }}-selenium-${{ env.BROWSER }} -- --env remote --headless -v --alluredir=allure-report --reruns=2
uv run --no-config pytest tests/web_tests --platform selenium --driver ${{ env.BROWSER }} --env remote --headless -v --alluredir=allure-report --reruns=2
continue-on-error: true

- name: Teardown (Allure Report and Error Handling)
if: ${{ steps.tests.outcome == 'failure' }}
uses: ./.github/actions/teardown
with:
browser-name: ${{ env.BROWSER }}
tox-env: ${{ steps.setup.outputs.tox-env }}
engine: "selenium"
11 changes: 9 additions & 2 deletions .github/workflows/static_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ name: Static Tests
on:
push:
branches:
- '**' # Trigger on push to any branch
- '**'
paths-ignore:
- 'docs/**'
- 'tests/web_tests/**'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- '.gitignore'

jobs:
static:
Expand All @@ -26,4 +33,4 @@ jobs:

- name: Run Static tests with ${{ matrix.python-version }}
run: |
tox -e py${{ steps.setup.outputs.tox-env }}-static
uv run --no-config pytest tests/static_tests
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
Expand Down
31 changes: 0 additions & 31 deletions .readthedocs.yaml

This file was deleted.

16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# Dyatel Changelog
# Mops Changelog

<br>

## v3.0.0
*Release date: 2025-01-13*

### Breaking: Project renamed

### Changed
- Dev: pyproject.toml integrated instead of setup.py
- Dev: UV integrated

### Removed
- Dev: tox usage removed

---

## v2.4.0
*Release date: 2025-01-10*

Expand Down
Loading

0 comments on commit b0c22ee

Please sign in to comment.