Skip to content

Commit

Permalink
Parallelize test cases
Browse files Browse the repository at this point in the history
quick build
  • Loading branch information
nvuillam committed Jun 26, 2022
1 parent 2000abf commit f093fb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ fi
# Run test cases with pytest
if [ "${TEST_CASE_RUN}" == "true" ]; then
echo "[MegaLinter init] RUNNING TEST CASES"
pip install pytest-cov pytest-timeout
pip install pytest-cov pytest-timeout pytest-xdist
if [ -z "${TEST_KEYWORDS}" ]; then
pytest -v --timeout=80 --durations=0 --cov=megalinter --cov-report=xml megalinter/
pytest -v -n 3 --timeout=120 --durations=0 --cov=megalinter --cov-report=xml megalinter/
else
pytest -v --timeout=80 --durations=0 -k "${TEST_KEYWORDS}" megalinter/
pytest -v -n 3 --timeout=120 --durations=0 -k "${TEST_KEYWORDS}" megalinter/
fi
PYTEST_STATUS=$?
echo Pytest exited $PYTEST_STATUS
Expand Down
1 change: 1 addition & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ commentjson
pytablewriter
pytest-cov
pytest-timeout
pytest-xdist
python-gitlab
pyyaml
requests
Expand Down

0 comments on commit f093fb9

Please sign in to comment.