diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index a7f504b1b5941..7a30a4e3ebd05 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -20,175 +20,175 @@ jobs: with: bazel-target-prefix: '//py' - tox_flake8: - if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} - needs: check_workflow - runs-on: ubuntu-latest - steps: - - name: Checkout source tree - uses: actions/checkout@v2 - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7.10 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox==2.4.1 - - name: Test with tox - run: tox -c py/tox.ini - env: - TOXENV: flake8 + # tox_flake8: + # if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} + # needs: check_workflow + # runs-on: ubuntu-latest + # steps: + # - name: Checkout source tree + # uses: actions/checkout@v2 + # - name: Set up Python 3.7 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.7.10 + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install tox==2.4.1 + # - name: Test with tox + # run: tox -c py/tox.ini + # env: + # TOXENV: flake8 - tox_docs: - if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} - needs: check_workflow - runs-on: ubuntu-latest - steps: - - name: Checkout source tree - uses: actions/checkout@v2 - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7.10 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox==2.4.1 - - name: Test with tox - run: tox -c py/tox.ini - env: - TOXENV: docs + # tox_docs: + # if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} + # needs: check_workflow + # runs-on: ubuntu-latest + # steps: + # - name: Checkout source tree + # uses: actions/checkout@v2 + # - name: Set up Python 3.7 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.7.10 + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install tox==2.4.1 + # - name: Test with tox + # run: tox -c py/tox.ini + # env: + # TOXENV: docs - tox_mypy: - if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} - needs: check_workflow - runs-on: ubuntu-latest - steps: - - name: Checkout source tree - uses: actions/checkout@v2 - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox==2.4.1 - - name: Test with tox - run: | - tox -c py/tox.ini -- --cobertura-xml-report ci || true - bash <(curl -s https://codecov.io/bash) -f py/ci/cobertura.xml - env: - TOXENV: mypy + # tox_mypy: + # if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} + # needs: check_workflow + # runs-on: ubuntu-latest + # steps: + # - name: Checkout source tree + # uses: actions/checkout@v2 + # - name: Set up Python 3.7 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.7.9 + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install tox==2.4.1 + # - name: Test with tox + # run: | + # tox -c py/tox.ini -- --cobertura-xml-report ci || true + # bash <(curl -s https://codecov.io/bash) -f py/ci/cobertura.xml + # env: + # TOXENV: mypy - unit_tests: - if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} - needs: check_workflow - runs-on: ubuntu-latest - steps: - - name: Checkout source tree - uses: actions/checkout@v2 - - name: Cache Bazel artifacts - uses: actions/cache@v2 - with: - path: | - ~/.cache/bazel-disk - ~/.cache/bazel-repo - key: ${{ runner.os }}-bazel-python-unit-tests-${{ hashFiles('**/BUILD.bazel') }} - restore-keys: | - ${{ runner.os }}-bazel-python-unit-tests- - - name: Setup bazelisk - uses: ./.github/actions/setup-bazelisk - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7.10 - - name: Setup Java - uses: actions/setup-java@v1 - with: - java-version: '11' - - name: Run unit tests - uses: ./.github/actions/bazel - with: - command: test //py:unit + # unit_tests: + # if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} + # needs: check_workflow + # runs-on: ubuntu-latest + # steps: + # - name: Checkout source tree + # uses: actions/checkout@v2 + # - name: Cache Bazel artifacts + # uses: actions/cache@v2 + # with: + # path: | + # ~/.cache/bazel-disk + # ~/.cache/bazel-repo + # key: ${{ runner.os }}-bazel-python-unit-tests-${{ hashFiles('**/BUILD.bazel') }} + # restore-keys: | + # ${{ runner.os }}-bazel-python-unit-tests- + # - name: Setup bazelisk + # uses: ./.github/actions/setup-bazelisk + # - name: Set up Python 3.7 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.7.10 + # - name: Setup Java + # uses: actions/setup-java@v1 + # with: + # java-version: '11' + # - name: Run unit tests + # uses: ./.github/actions/bazel + # with: + # command: test //py:unit - chrome_tests: - if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} - needs: [ check_workflow, unit_tests ] - runs-on: ubuntu-latest - steps: - - name: Checkout source tree - uses: actions/checkout@v2 - - name: Cache Bazel artifacts - uses: actions/cache@v2 - with: - path: | - ~/.cache/bazel-disk - ~/.cache/bazel-repo - key: ${{ runner.os }}-bazel-chrome-tests-${{ hashFiles('**/BUILD.bazel') }} - restore-keys: | - ${{ runner.os }}-bazel-chrome-tests- - ${{ runner.os }}-bazel-python-unit-tests- - - name: Setup bazelisk - uses: ./.github/actions/setup-bazelisk - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7.10 - - name: Setup Java - uses: actions/setup-java@v1 - with: - java-version: '11' - - name: Setup Chrome and ChromeDriver - uses: ./.github/actions/setup-chrome - - name: Start XVFB - run: Xvfb :99 & - - name: Run browser tests in Chrome - uses: ./.github/actions/bazel-test - with: - query: //py:test-chrome - attempts: 3 - env: - DISPLAY: :99 + # chrome_tests: + # if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} + # needs: [ check_workflow, unit_tests ] + # runs-on: ubuntu-latest + # steps: + # - name: Checkout source tree + # uses: actions/checkout@v2 + # - name: Cache Bazel artifacts + # uses: actions/cache@v2 + # with: + # path: | + # ~/.cache/bazel-disk + # ~/.cache/bazel-repo + # key: ${{ runner.os }}-bazel-chrome-tests-${{ hashFiles('**/BUILD.bazel') }} + # restore-keys: | + # ${{ runner.os }}-bazel-chrome-tests- + # ${{ runner.os }}-bazel-python-unit-tests- + # - name: Setup bazelisk + # uses: ./.github/actions/setup-bazelisk + # - name: Set up Python 3.7 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.7.10 + # - name: Setup Java + # uses: actions/setup-java@v1 + # with: + # java-version: '11' + # - name: Setup Chrome and ChromeDriver + # uses: ./.github/actions/setup-chrome + # - name: Start XVFB + # run: Xvfb :99 & + # - name: Run browser tests in Chrome + # uses: ./.github/actions/bazel-test + # with: + # query: //py:test-chrome + # attempts: 3 + # env: + # DISPLAY: :99 - firefox_tests_remote: - if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} - needs: [ check_workflow, unit_tests ] - runs-on: ubuntu-latest - steps: - - name: Checkout source tree - uses: actions/checkout@v2 - - name: Cache Bazel artifacts - uses: actions/cache@v2 - with: - path: | - ~/.cache/bazel-disk - ~/.cache/bazel-repo - key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }} - restore-keys: | - ${{ runner.os }}-bazel-firefox-tests- - ${{ runner.os }}-bazel-python-unit-tests- - - name: Setup bazelisk - uses: ./.github/actions/setup-bazelisk - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7.10 - - name: Setup Java - uses: actions/setup-java@v1 - with: - java-version: '11' - - name: Setup Firefox and GeckoDriver - uses: ./.github/actions/setup-firefox - - name: Start XVFB - run: Xvfb :99 & - - name: Run browser tests in Firefox (Remote) - uses: ./.github/actions/bazel - with: - command: test --jobs 1 //py:test-remote - env: - DISPLAY: :99 + # firefox_tests_remote: + # if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} + # needs: [ check_workflow, unit_tests ] + # runs-on: ubuntu-latest + # steps: + # - name: Checkout source tree + # uses: actions/checkout@v2 + # - name: Cache Bazel artifacts + # uses: actions/cache@v2 + # with: + # path: | + # ~/.cache/bazel-disk + # ~/.cache/bazel-repo + # key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }} + # restore-keys: | + # ${{ runner.os }}-bazel-firefox-tests- + # ${{ runner.os }}-bazel-python-unit-tests- + # - name: Setup bazelisk + # uses: ./.github/actions/setup-bazelisk + # - name: Set up Python 3.7 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.7.10 + # - name: Setup Java + # uses: actions/setup-java@v1 + # with: + # java-version: '11' + # - name: Setup Firefox and GeckoDriver + # uses: ./.github/actions/setup-firefox + # - name: Start XVFB + # run: Xvfb :99 & + # - name: Run browser tests in Firefox (Remote) + # uses: ./.github/actions/bazel + # with: + # command: test --jobs 1 //py:test-remote + # env: + # DISPLAY: :99 firefox_tests: if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }} @@ -219,8 +219,12 @@ jobs: java-version: '11' - name: Setup Firefox and GeckoDriver uses: ./.github/actions/setup-firefox - - name: Start XVFB + - name: Install Fluxbox + run: sudo apt-get -y install fluxbox + - name: Start Xvfb run: Xvfb :99 & + - name: Start Fluxbox + run: fluxbox -display :99 & - name: Run browser tests in Firefox uses: ./.github/actions/bazel-test with: diff --git a/py/test/selenium/webdriver/common/api_example_tests.py b/py/test/selenium/webdriver/common/api_example_tests.py index bc95aab767ec3..adb962f591925 100644 --- a/py/test/selenium/webdriver/common/api_example_tests.py +++ b/py/test/selenium/webdriver/common/api_example_tests.py @@ -240,8 +240,6 @@ def test_is_element_displayed(driver, pages): @pytest.mark.xfail_chrome -@pytest.mark.xfail_firefox(reason='https://github.com/mozilla/geckodriver/issues/2042') -@pytest.mark.xfail_remote(reason='https://github.com/mozilla/geckodriver/issues/2042') def test_move_window_position(driver, pages): pages.load("blank.html") loc = driver.get_window_position() diff --git a/py/test/selenium/webdriver/common/window_tests.py b/py/test/selenium/webdriver/common/window_tests.py index 4853fd0fde4d1..90b1015d5ae1a 100644 --- a/py/test/selenium/webdriver/common/window_tests.py +++ b/py/test/selenium/webdriver/common/window_tests.py @@ -65,8 +65,6 @@ def test_should_get_the_position_of_the_current_window(driver): assert position.get('y') >= 0 -@pytest.mark.xfail_firefox(reason='https://github.com/mozilla/geckodriver/issues/2042') -@pytest.mark.xfail_remote(reason='https://github.com/mozilla/geckodriver/issues/2042') def test_should_set_the_position_of_the_current_window(driver): position = driver.get_window_position() @@ -93,8 +91,6 @@ def test_should_get_the_rect_of_the_current_window(driver): assert rect.get('height') >= 0 -@pytest.mark.xfail_firefox(reason='https://github.com/mozilla/geckodriver/issues/2042') -@pytest.mark.xfail_remote(reason='https://github.com/mozilla/geckodriver/issues/2042') @pytest.mark.xfail_safari(raises=WebDriverException, reason='Get Window Rect command not implemented') def test_should_set_the_rect_of_the_current_window(driver):