aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/ci.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci.sh')
-rwxr-xr-xscripts/ci.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/ci.sh b/scripts/ci.sh
new file mode 100755
index 000000000..1819f73dd
--- /dev/null
+++ b/scripts/ci.sh
@@ -0,0 +1,41 @@
1#!/bin/sh
2
3set -eu
4
5if [ $# -eq 0 ]; then
6 echo "Need test suite argument."
7 exit -1
8fi
9
10killall -q peertube || true
11
12if [ "$1" = "misc" ]; then
13 npm run build -- --light-fr
14 mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/client.ts \
15 server/tests/feeds/index.ts \
16 server/tests/misc-endpoints.ts \
17 server/tests/helpers/index.ts \
18 server/tests/plugins/index.ts
19elif [ "$1" = "cli" ]; then
20 npm run build:server
21 CC=gcc-4.9 CXX=g++-4.9 npm run setup:cli
22 mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/cli/index.ts
23elif [ "$1" = "api-1" ]; then
24 npm run build:server
25 sh ./server/tests/api/ci-1.sh 2
26elif [ "$1" = "api-2" ]; then
27 npm run build:server
28 sh ./server/tests/api/ci-2.sh 2
29elif [ "$1" = "api-3" ]; then
30 npm run build:server
31 sh ./server/tests/api/ci-3.sh 2
32elif [ "$1" = "api-4" ]; then
33 npm run build:server
34 sh ./server/tests/api/ci-4.sh 2
35elif [ "$1" = "lint" ]; then
36 npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts"
37
38 ( cd client
39 npm run lint
40 )
41fi