diff --git a/cd-scripts/runTests.sh b/cd-scripts/runTests.sh new file mode 100644 index 00000000..471a2d7e --- /dev/null +++ b/cd-scripts/runTests.sh @@ -0,0 +1,22 @@ +#!/bin/sh -x + +/home/jenkins/.local/bin/pre-commit run --origin HEAD --source origin/master +PRE_COMMIT_STATUS=$? + +if [ $PRE_COMMIT_STATUS -ne 0 ]; then + git diff +fi + +pip install ujson +tox -e py39; TOX_EXIT_CODE=$? + +# Further ideas for jobs to run: +# - license check +# - make sure test coverage increases +# And, once we're sure that the pipeline is working: +# - integration/performance tests +# Once we have docs: +# - documentation coverage +# - docs build (on master only) + +[ "$TOX_EXIT_CODE" -eq 0 -a "$PRE_COMMIT_STATUS" -eq 0 ] || exit 1 \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt index 2e59e295..8ac54d25 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,4 +13,4 @@ pytest-cov pytest-httpbin pytest-httpserver sanic -werkzeug==2.0.3 +werkzeug==3.0.3