From 1ae4ba33a84d92f3622c18f7bc991b97e6473575 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Mon, 13 Nov 2023 13:42:30 -0500 Subject: [PATCH] add coverage config --- .github/workflows/tests.yml | 2 +- bbot/test/coverage.cfg | 2 ++ bbot/test/run_tests.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 bbot/test/coverage.cfg diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7e2c395f7..bfca0d67d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,7 +43,7 @@ jobs: poetry install - name: Run tests run: | - poetry run pytest --exitfirst --reruns 2 -o timeout_func_only=true --timeout 600 --disable-warnings --log-cli-level=DEBUG --cov-report xml:cov.xml --cov=bbot . + poetry run pytest --exitfirst --reruns 2 -o timeout_func_only=true --timeout 600 --disable-warnings --log-cli-level=DEBUG --cov-config=bbot/test/coverage.cfg --cov-report xml:cov.xml --cov=bbot . - name: Upload Code Coverage uses: codecov/codecov-action@v3 with: diff --git a/bbot/test/coverage.cfg b/bbot/test/coverage.cfg new file mode 100644 index 000000000..f02909898 --- /dev/null +++ b/bbot/test/coverage.cfg @@ -0,0 +1,2 @@ +[coverage:run] +parallel = true diff --git a/bbot/test/run_tests.sh b/bbot/test/run_tests.sh index b95f4ab44..0b20a7056 100755 --- a/bbot/test/run_tests.sh +++ b/bbot/test/run_tests.sh @@ -14,4 +14,4 @@ flake8 --select F,E722 --ignore F403,F405,F541 --per-file-ignores="*/__init__.py echo echo "[+] Testing with pytest" -pytest --exitfirst --disable-warnings --log-cli-level=ERROR "$bbot_dir" --cov=bbot/test/test_step_2/test_cli.py --cov-report term-missing +pytest --exitfirst --disable-warnings --log-cli-level=ERROR "$bbot_dir" --cov=bbot/test/test_step_2/test_cli.py --cov-report="term-missing" --cov-config="$bbot_dir/test/coverage.cfg"