forked from rero/rero-ils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests.sh
executable file
·48 lines (43 loc) · 1.49 KB
/
run-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
43
44
45
46
47
48
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
#
# RERO ILS
# Copyright (C) 2019 RERO
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if [ $# -eq 0 ]
then
grep -r fuzzy rero_ils/translations
if [ $? -eq 0 ]
then
echo "Error: fuzzy tranlations!"
exit 1
fi
set -e
pipenv check -i 36759
pipenv run flask utils check_json tests rero_ils/modules data
pipenv run pydocstyle rero_ils tests docs
pipenv run isort -rc -c -df --skip ui
# syntax check for typescript
CWD=`pwd`
cd ui; pipenv run npm run lint; cd -
pipenv run check-manifest --ignore ".travis-*,docs/_build*,ui/node_modules*,rero_ils/static/js/rero_ils/ui*"
pipenv run sphinx-build -qnNW docs docs/_build/html
pipenv run test
fi
if [ "$1" = "external" ]
then
export PYTEST_ADDOPTS="--cov-append -m "external""
pipenv run test
exit 0
fi