Add coverage to python tests
This commit is contained in:
parent
db291b50c0
commit
11d2bc3ed5
|
|
@ -16,9 +16,8 @@ pipelines:
|
|||
- pip3 install -r server/requirements/requirements-dev.txt
|
||||
- git-crypt status -e | sort > git-crypt-encrypted-files-check.txt && diff git-crypt-encrypted-files.txt git-crypt-encrypted-files-check.txt
|
||||
- trufflehog --exclude_paths trufflehog-exclude-patterns.txt --allow trufflehog-allow.json --entropy=True --max_depth=100 .
|
||||
- ./server/run_tests.sh
|
||||
- ./server/run_tests_coverage.sh
|
||||
# - ./src/run_pylint.sh
|
||||
# - ./src/run_unittests_coverage.sh
|
||||
- step:
|
||||
name: cypress tests
|
||||
max-time: 45
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
# script should fail when any process returns non zero code
|
||||
set -e
|
||||
|
||||
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
coverage run -m pytest --junitxml=../test-reports/coverage.xml $1
|
||||
|
||||
coverage_python=`coverage report -m | tail -n1 | awk '{print $4}'`
|
||||
commit=`git rev-parse HEAD`
|
||||
data="{\"${commit}/coverage_python\": \"${coverage_python}\"}"
|
||||
curl -X PATCH -d "${data}" 'https://commit-metadata.firebaseio.com/commits.json'
|
||||
Loading…
Reference in New Issue