cloudpassage/cloudpassage-halo-python-sdk

View on GitHub
run_tests.sh

Summary

Maintainability
Test Coverage
#!/bin/bash

if [ "${PY_VER}" = "2.7.10" ]; then
  apt-get update && apt-get install -y git
  curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  chmod +x ./cc-test-reporter
  ./cc-test-reporter before-build
  /opt/python/bin/python -m${PYTEST_MODULE:-py.test} --cov-report xml --cov=cloudpassage tests
  export TEST_STATUS=$?
  ./cc-test-reporter after-build --exit-code ${TEST_STATUS}
else
  /opt/python/bin/python -m${PYTEST_MODULE:-py.test} -n 6 --cov=cloudpassage --cov-report term-missing --profile tests/
  export TEST_STATUS=$?
fi

exit ${TEST_STATUS}