-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_all_tests.sh
executable file
·42 lines (32 loc) · 1.05 KB
/
run_all_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
echo "Running flake8"
flake_test=`flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`
if [[ "${flake_test}" != 0 ]]; then
echo "flake failed"
exit
fi
rm -rf reports
mkdir reports
mkdir reports/junit
mkdir reports/coverage
mkdir reports/badges
echo "Running flake8, aggressive"
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics > reports/flake.txt
echo "Checking for test file completeness"
./tests/completeness_crawler.py eee tests bin/ > reports/completeness-crawler.txt
grep MISSING reports/completeness-crawler.txt
echo "Running coverage.py"
coverage erase
coverage run --branch -m pytest --junit-xml=reports/junit/junit.xml
echo "Generating reports"
coverage html
mv htmlcov reports
coverage xml
mv coverage.xml reports/coverage/coverage.xml
genbadge tests
sleep 1
genbadge coverage
sleep 1
#wget https://github.com/harmslab/topiary/actions/workflows/python-app.yml/badge.svg -O ghwf.svg
#wget https://readthedocs.org/projects/topiary-asr/badge/?version=latest -O rtd.svg
mv *.svg docs/badges