aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-04-20 21:21:20 +0100
committerGravatar Chris Lovering <[email protected]>2022-04-20 21:21:20 +0100
commitb28ad5e3222df195db8090d4e8a69d7d19f604c6 (patch)
treeb51bafc7441ce28a53b9b5af67e28733117f1656
parentDon't use internal discord.py methods for available help channels message (diff)
Automatically determine number threads to use with pytest
-rw-r--r--.github/workflows/lint-test.yml2
-rw-r--r--pyproject.toml6
2 files changed, 4 insertions, 4 deletions
diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml
index cbdac63ab..57cc544d9 100644
--- a/.github/workflows/lint-test.yml
+++ b/.github/workflows/lint-test.yml
@@ -125,7 +125,7 @@ jobs:
[flake8] %(code)s: %(text)s'"
- name: Run tests and generate coverage report
- run: pytest -n 8 --cov --disable-warnings -q
+ run: pytest -n auto --cov --disable-warnings -q
# Prepare the Pull Request Payload artifact. If this fails, we
# we fail silently using the `continue-on-error` option. It's
diff --git a/pyproject.toml b/pyproject.toml
index e097ac990..2a4415419 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -64,9 +64,9 @@ lint = "pre-commit run --all-files"
precommit = "pre-commit install"
build = "docker build -t ghcr.io/python-discord/bot:latest -f Dockerfile ."
push = "docker push ghcr.io/python-discord/bot:latest"
-test-nocov = "pytest -n 8"
-test = "pytest -n 8 --cov-report= --cov --ff"
-retest = "pytest -n 8 --cov-report= --cov --lf"
+test-nocov = "pytest -n auto"
+test = "pytest -n auto --cov-report= --cov --ff"
+retest = "pytest -n auto --cov-report= --cov --lf"
html = "coverage html"
report = "coverage report"
isort = "isort ."