summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-04-01 10:23:29 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-04-01 10:52:19 -0500
commit4196c138d00f92ef3f55da8bbb4818c180d5f7d7 (patch)
tree8f7b45d23054c9473886f745aa0180d1713736c5 /.github
parentd80901a689876fceb88330d6698432eba33592b0 (diff)
downloadrequests-cache-4196c138d00f92ef3f55da8bbb4818c180d5f7d7.tar.gz
Use pytest-xdist to parallelize stress tests
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8e6ecfa..f86b63f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -51,9 +51,9 @@ jobs:
# Latest python version: Run unit tests with coverage and send to coveralls
- name: Run unit tests with code coverage report
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
- # Run unit tests first to fail more quickly
+ # Run unit tests first (and with multiprocessing) to fail quickly if there are issues
run: |
- pytest tests/unit --cov=requests_cache --cov-report=term --cov-report=html
+ pytest tests/unit --numprocesses=auto --cov=requests_cache --cov-report=term --cov-report=html
pytest tests/integration --cov=requests_cache --cov-report=term --cov-report=html --cov-append
- name: Send code coverage report to Coveralls
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
@@ -65,7 +65,7 @@ jobs:
- name: Run unit tests
if: ${{ matrix.python-version != env.LATEST_PY_VERSION }}
run: |
- pytest tests/unit
+ pytest --numprocesses=auto tests/unit
pytest tests/integration
# Run code analysis checks