summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-13 11:43:37 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-14 12:06:33 +0100
commit5bca14e72c204b31424069ad0090aefa76071e8c (patch)
treece00b14ed66436d7175ce04b0ce48f1b89e97c3f /check
parent607f62ae6bc8f684095e447569cff27ba7c8a5dd (diff)
downloadqvisqve-5bca14e72c204b31424069ad0090aefa76071e8c.tar.gz
Fix: start Salami
This is based on Qvarn, because the implementation is so similar to hat Salami needs. This commit drops the unwanted bits of Qvarn and changes things to be Salami instead. This commit only introduces the /version endpoint.
Diffstat (limited to 'check')
-rwxr-xr-xcheck30
1 files changed, 19 insertions, 11 deletions
diff --git a/check b/check
index e4adfe3..eef2968 100755
--- a/check
+++ b/check
@@ -17,22 +17,30 @@
set -eu
+title()
+{
+ printf '\n%s\n' "$@"
+ for i in $(seq 77)
+ do
+ printf '%c' -
+ done
+ printf '\n'
+}
+
run_yarns()
{
yarn yarns/*.yarn \
-s yarns/lib.py --shell python2 --shell-arg '' --cd-datadir "$@"
}
+title "Unit tests"
python3 -m CoverageTestRunner --ignore-missing-from=without-tests
-pep8 qvarn
-pylint3 -j0 --rcfile pylint.conf qvarn
-
-if [ "${QVARN_POSTGRES:-no}" = no ]
-then
- # Run yarns without Postgres. For speed.
- run_yarns "$@"
-else
- scripts/pgempty
- run_yarns --env "QVARN_POSTGRES=$QVARN_POSTGRES" "$@"
-fi
+title "Code style"
+pycodestyle salami
+
+title "Static checking"
+pylint3 -j0 --rcfile pylint.conf salami
+
+title OK
+echo All tests pass.