From acbbf9c7e6240f63a35a67bfd8b29d731f8cf206 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lenain Date: Fri, 22 Mar 2024 09:01:03 +0100 Subject: [PATCH 1/2] Activate the `pytest-xdist` addon for `pytest` in CI. --- .github/workflows/ci.yml | 5 ++--- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4de41bba..952ff503 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,13 +78,12 @@ jobs: # we install ctapipe using pip to be able to select any commit, e.g. the current main pip install \ "git+https://github.com/cta-observatory/ctapipe@$CTAPIPE_VERSION" \ - pytest-cov echo "pip install -e ." - pip install -e . + pip install -e .[test] - name: Tests run: | - pytest --cov=nectarchain --cov-report=xml + pytest -n auto --dist loadscope --cov=nectarchain --cov-report=xml - uses: codecov/codecov-action@v3 diff --git a/pyproject.toml b/pyproject.toml index 4286470f..c0833017 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ dynamic = ["version"] test = [ "pytest", "pytest-cov", + "pytest-xdist", ] dev = [ "setuptools_scm", From a1bfbf650e7bce00efb14ccdb78f5445e30c6a08 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lenain Date: Fri, 22 Mar 2024 09:01:23 +0100 Subject: [PATCH 2/2] Fix typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 952ff503..6d8ec86e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: echo "Installing additional pip packages" # we install ctapipe using pip to be able to select any commit, e.g. the current main pip install \ - "git+https://github.com/cta-observatory/ctapipe@$CTAPIPE_VERSION" \ + "git+https://github.com/cta-observatory/ctapipe@$CTAPIPE_VERSION" echo "pip install -e ." pip install -e .[test]