-
Notifications
You must be signed in to change notification settings - Fork 13
/
run-tests.sh
executable file
·43 lines (35 loc) · 1.15 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
#!/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/>.
RED='\033[0;31m'
GREEN='\033[0;0;32m'
NC='\033[0m' # No Color
display_error_message () {
echo -e "${RED}$1${NC}" 1>&2
}
display_success_message () {
echo -e "${GREEN}$1${NC}" 1>&2
}
set -e
display_success_message "Linting the projects..."
npm run lint
display_success_message "Build shared library"
npm run build-shared
display_success_message "Run the tests"
ng test --no-watch --no-progress --browsers=ChromeHeadlessCI
display_success_message "Run packing"
npm run pack