diff --git a/.github/workflows/cron-staging.yml b/.github/workflows/cron-staging.yml index 27bfad72cd..dec1ffc210 100644 --- a/.github/workflows/cron-staging.yml +++ b/.github/workflows/cron-staging.yml @@ -36,11 +36,12 @@ jobs: ${{ runner.os }}-${{ matrix.python-version }} - name: Install Deps run: python -m pip install -U tox setuptools virtualenv wheel - - name: Install and Run Tests + - name: Install and Run Tests (Windows and Linux) run: tox -e terra-main if: runner.os != 'macOS' - - name: Install and Run Tests + - name: Install and Run Tests (Macs only) run: tox -e terra-main if: runner.os == 'macOS' env: + TEST_TIMEOUT: 120 OMP_NUM_THREADS: 1 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f45bb6170..a0f990eaab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,8 +49,15 @@ jobs: stestr- - name: Install Deps run: python -m pip install -U tox setuptools virtualenv wheel stestr - - name: Install and Run Tests + - name: Install and Run Tests (Windows and Linux) run: tox -e py + if: runner.os != 'macOS' + - name: Install and Run Tests (Macs only) + run: tox -e py + if: runner.os == 'macOS' + env: + TEST_TIMEOUT: 120 + OMP_NUM_THREADS: 1 - name: Clean up stestr cache run: stestr history remove all diff --git a/test/base.py b/test/base.py index d1ad6e8ed6..dc7384afb9 100644 --- a/test/base.py +++ b/test/base.py @@ -33,7 +33,7 @@ from .extended_equality import is_equivalent # Fail tests that take longer than this -TEST_TIMEOUT = os.environ.get("TEST_TIMEOUT", 60) +TEST_TIMEOUT = int(os.environ.get("TEST_TIMEOUT", 60)) class QiskitExperimentsTestCase(QiskitTestCase): diff --git a/tox.ini b/tox.ini index 70be5b521e..658e81e57a 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,7 @@ passenv = QISKIT_PARALLEL RAYON_NUM_THREADS QISKIT_IBM_* + TEST_TIMEOUT commands = stestr run {posargs} [testenv:cover]