From 4a82dfaa36dcd354799dfacc1ac35d1d48895a1f Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Mon, 17 Jan 2022 03:41:15 -0500 Subject: [PATCH] Xdist tests (#211) * add pytest-xdist to reqs * update pytest command call --- .ci/310-DEV.yaml | 1 + .ci/310.yaml | 1 + .ci/37.yaml | 1 + .ci/38.yaml | 1 + .ci/39.yaml | 1 + .github/workflows/unittests.yml | 8 +++++--- requirements_tests.txt | 1 + 7 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.ci/310-DEV.yaml b/.ci/310-DEV.yaml index ecb4ccbb..9e2167aa 100644 --- a/.ci/310-DEV.yaml +++ b/.ci/310-DEV.yaml @@ -18,3 +18,4 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-xdist diff --git a/.ci/310.yaml b/.ci/310.yaml index b0270bfb..fbf74058 100644 --- a/.ci/310.yaml +++ b/.ci/310.yaml @@ -19,6 +19,7 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-xdist # docs - nbsphinx - numpydoc diff --git a/.ci/37.yaml b/.ci/37.yaml index 9505b668..4bc1fad0 100644 --- a/.ci/37.yaml +++ b/.ci/37.yaml @@ -19,3 +19,4 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-xdist diff --git a/.ci/38.yaml b/.ci/38.yaml index fac3da62..82110f45 100644 --- a/.ci/38.yaml +++ b/.ci/38.yaml @@ -19,3 +19,4 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-xdist diff --git a/.ci/39.yaml b/.ci/39.yaml index 137231a9..0a2d3170 100644 --- a/.ci/39.yaml +++ b/.ci/39.yaml @@ -19,6 +19,7 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-xdist # docs - nbsphinx - numpydoc diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 8e3b4980..7ed006d3 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -12,7 +12,9 @@ unittests: name: ${{ matrix.os }}, ${{ matrix.environment-file }} runs-on: ${{ matrix.os }} - timeout-minutes: 30 + timeout-minutes: 30 + env: + RUN_TEST: pytest spopt --cov spopt -v -n auto --cov-config .coveragerc --cov-report xml --color yes --cov-append --cov-report term-missing strategy: matrix: os: [ubuntu-latest] @@ -43,12 +45,12 @@ - name: run tests - bash shell: bash -l {0} - run: pytest -v spopt --cov=spopt --cov-report=xml + run: ${{ env.RUN_TEST }} if: matrix.os != 'windows-latest' - name: run tests - powershell shell: powershell - run: pytest -v spopt --cov=spopt --cov-report=xml + run: ${{ env.RUN_TEST }} if: matrix.os == 'windows-latest' - name: codecov diff --git a/requirements_tests.txt b/requirements_tests.txt index 2172117d..dc476d1b 100644 --- a/requirements_tests.txt +++ b/requirements_tests.txt @@ -2,3 +2,4 @@ codecov coverage pytest pytest-cov +pytest-xdist