Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Integrate pytest-xdist Plugin for Parallel and Concurrent Testing (#3870)

Andres Caicedo251317898041
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a08ecb0211..f21a263ef2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -71,7 +71,7 @@ jobs:
- name: Run unittest tests with coverage
run: |
- pytest --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term
+ pytest -n auto --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term
env:
CI: true
diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml
index 28576d02a8..315c42e5ec 100644
--- a/.github/workflows/docker-ci.yml
+++ b/.github/workflows/docker-ci.yml
@@ -101,7 +101,7 @@ jobs:
set +e
test_output=$(
docker run --env CI --env OPENAI_API_KEY --entrypoint python ${{ env.IMAGE_NAME }} -m \
- pytest --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term 2>&1
+ pytest -n auto --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term 2>&1
)
test_failure=$?
diff --git a/requirements.txt b/requirements.txt
index e1900ef536..be015f2b0a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -53,3 +53,4 @@ pytest-integration
pytest-mock
vcrpy
pytest-recording
+pytest-xdist
\ No newline at end of file