From 0f8c6ffe9e904b71c710e48987080ef8b75cc8a2 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 25 Oct 2025 15:38:25 +0200 Subject: [PATCH] Run the bulk of pytest in parallel --- .github/workflows/ci.yml | 3 ++- src/ifcopenshell-python/Makefile | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98efade0ba..75c2a93e77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,7 @@ jobs: pip install xmlschema xsdata numpy lxml pytest isodate lark networkx tabulate python-dateutil shapely pip install src/bcf --no-deps pip install git+https://github.com/zdhoward/aud + pip install pytest-xdist==3.8.0 - name: Install C++ dependencies run: | @@ -143,7 +144,7 @@ jobs: mv ifcopenshell ifcopenshell-local # Force testing on installed module pip install -e ../ifcpatch --no-deps # Needed for sql.py tests. ERROR=0 - make test || ERROR=1 + make test-parallel || ERROR=1 cd ../bcf && make test || ERROR=1 pip install requests cd ../bsdd && make test || ERROR=1 diff --git a/src/ifcopenshell-python/Makefile b/src/ifcopenshell-python/Makefile index 17042a9693..13fb5d596c 100644 --- a/src/ifcopenshell-python/Makefile +++ b/src/ifcopenshell-python/Makefile @@ -76,6 +76,11 @@ build-urls: test: pytest -p no:pytest-blender test --ignore=test/util/test_shape_builder.py +.PHONY: test-parallel +test-parallel: + @NPROCS=$$(nproc); \ + pytest -p no:pytest-blender -n $$NPROCS test --ignore=test/util/test_shape_builder.py + .PHONY: test-mathutils test-mathutils: pytest -p no:pytest-blender test/util/test_shape_builder.py