Skip to content

Commit

Permalink
Merge pull request #397 from aleksandr-kotlyar/ci-optimization-07-01-…
Browse files Browse the repository at this point in the history
…2022

ci optimization & fix imports & fix dialog tests
  • Loading branch information
aleksandr-kotlyar authored Jan 7, 2022
2 parents 941ef86 + 3e39cde commit 14e05c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 28 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,7 @@ jobs:
- name: Pycodestyle
run: |
pip install pycodestyle
pycodestyle $(pwd) --ignore=E501,W503,E402,E731 --exclude=.venv,tests_from_past
Pycodestyle-full-report:
name: Lint Pycodestyle Full Report
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Pycodestyle Full Report
run: |
pip install pycodestyle
pycodestyle $(pwd) --ignore=E501,W503 --exclude=.venv,tests_from_past
continue-on-error: true
pycodestyle $(pwd) --ignore=E501,W503,E402,E731 --exclude=.venv
Pylint:
name: Lint Pylint
Expand All @@ -58,7 +42,7 @@ jobs:
run: |
pip install pylint
touch __init__.py
pylint $(pwd) --rcfile=.pylintrc --disable="$(cat .pylint-disabled-rules)" --ignore-patterns=.venv,tests_from_past
pylint $(pwd) --rcfile=.pylintrc --disable="$(cat .pylint-disabled-rules)" --ignore-patterns=.venv
rm __init__.py
Pylint-full-report:
Expand All @@ -75,5 +59,5 @@ jobs:
run: |
pip install pylint
touch __init__.py
pylint $(pwd) --rcfile=.pylintrc --disable="" --ignore-patterns=.venv,tests_from_past --exit-zero
pylint $(pwd) --rcfile=.pylintrc --disable="" --ignore-patterns=.venv --exit-zero
rm __init__.py
10 changes: 4 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:

test:
name: Test selene
name: Tests
runs-on: ubuntu-20.04
env:
DISPLAY: ":99"
Expand Down Expand Up @@ -36,17 +36,15 @@ jobs:
poetry install
if: env.GIT_DIFF

# can be packaged as Docker-image
- name: Install Firefox & Chrome & xvfb
# can be packaged as Docker-image; p.s.: no need to install chrome or firefox on github-actions
- name: Install xvfb
run: |
sudo apt-get update
sudo apt-get install firefox
sudo apt-get install google-chrome-stable
sudo apt-get install xvfb
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
if: env.GIT_DIFF

- name: Test selene with pytest
- name: Tests
run: |
poetry run pytest -sv --cov-config .coveragerc --cov-report html:skip-covered --cov-report term:skip-covered --cov=selene --cov-report xml:coverage.xml --tb=short tests/ --headless=True
mkdir -p Artifacts/skip-covered
Expand Down
2 changes: 1 addition & 1 deletion selene/api/shared/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

from selene.api.base import *

from selene.support.shared import browser, config, s, ss
from selene.support.shared import browser, config, jquery_style
4 changes: 2 additions & 2 deletions tests/examples/test_wait_until.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_progress_bar_disappears_in_time(browser):
show_dialog_btn = browser.element('.btn-primary')
dialog = browser.element('.modal-backdrop.fade.in')
browser.open(
'https://www.seleniumeasy.com/test/bootstrap-progress-bar-dialog-demo.html'
'https://demo.seleniumeasy.com/bootstrap-progress-bar-dialog-demo.html'
)

show_dialog_btn.click()
Expand All @@ -70,7 +70,7 @@ def test_progress_bar_does_not_disappear_in_time(browser):
show_dialog_btn = browser.element('.btn-primary')
dialog = browser.element('.modal-backdrop.fade.in')
browser.open(
'https://www.seleniumeasy.com/test/bootstrap-progress-bar-dialog-demo.html'
'https://demo.seleniumeasy.com/bootstrap-progress-bar-dialog-demo.html'
)

show_dialog_btn.click()
Expand Down

0 comments on commit 14e05c5

Please sign in to comment.