From 199395a5018991fd9b02336d90670936d1811800 Mon Sep 17 00:00:00 2001 From: Feda Curic Date: Mon, 18 Sep 2023 10:03:22 +0200 Subject: [PATCH] Turn on gui tests for mac Only test Python 3.11 to save time. Increased time-out to 15min as gui-tests are for some reason slower than they are on ubuntu. Co-authored by: Eivind Commitin --- .github/workflows/build.yml | 11 ++--------- .github/workflows/test_ert.yml | 2 +- tests/conftest.py | 3 ++- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87931207b9f..7e49c4e8028 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,7 +92,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11' ] + python-version: [ '3.11' ] uses: ./.github/workflows/build-wheels-macos.yml with: python-version: ${{ matrix.python-version }} @@ -123,16 +123,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11' ] + python-version: [ '3.11' ] os: [ macos-latest ] test-type: [ 'integration-tests', 'unit-tests', 'gui-test' ] - exclude: - - os: macos-latest - python-version: '3.9' - - os: macos-latest - test-type: 'gui-test' - - os: macos-latest - python-version: '3.10' uses: ./.github/workflows/test_ert.yml with: os: ${{ matrix.os }} diff --git a/.github/workflows/test_ert.yml b/.github/workflows/test_ert.yml index 2bfb6946b79..591ae32d5b6 100644 --- a/.github/workflows/test_ert.yml +++ b/.github/workflows/test_ert.yml @@ -45,7 +45,7 @@ jobs: - name: Test GUI if: inputs.test-type == 'gui-test' - timeout-minutes: 10 + timeout-minutes: 15 run: | pytest tests --junit-xml=junit.xml -sv --mpl -m "requires_window_manager" --benchmark-disable diff --git a/tests/conftest.py b/tests/conftest.py index e3e83d47e3b..8b8da3068ab 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,4 @@ +import sys import fileinput import os import pkgutil @@ -180,7 +181,7 @@ def mock_connect(monkeypatch): @pytest.fixture(scope="session", autouse=True) def hide_window(request): - if request.config.getoption("--show-gui"): + if sys.platform == "darwin" or request.config.getoption("--show-gui"): yield return