forked from reanahub/reana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests.sh
executable file
·76 lines (63 loc) · 1.22 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
#
# This file is part of REANA.
# Copyright (C) 2020 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
# Quit on errors
set -o errexit
# Quit on unbound symbols
set -o nounset
check_script () {
shellcheck run-tests.sh
}
check_black () {
black --check .
}
check_flake8 () {
flake8 .
}
check_pydocstyle () {
pydocstyle reana
}
check_manifest () {
check-manifest
}
check_sphinx () {
sphinx-build -qnNW docs docs/_build/html
}
check_pytest () {
python setup.py test
}
check_helm () {
helm lint helm/reana
}
check_all () {
check_script
check_black
check_flake8
check_pydocstyle
check_manifest
check_sphinx
check_pytest
check_helm
}
if [ $# -eq 0 ]; then
check_all
exit 0
fi
for arg in "$@"
do
case $arg in
--check-shellscript) check_script;;
--check-black) check_black;;
--check-flake8) check_flake8;;
--check-pydocstyle) check_pydocstyle;;
--check-manifest) check_manifest;;
--check-sphinx) check_sphinx;;
--check-pytest) check_pytest;;
--check-helm) check_helm;;
*)
esac
done