diff options
Diffstat (limited to 'scripts/ci.sh')
-rwxr-xr-x | scripts/ci.sh | 41 |
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 | |||
3 | set -eu | ||
4 | |||
5 | if [ $# -eq 0 ]; then | ||
6 | echo "Need test suite argument." | ||
7 | exit -1 | ||
8 | fi | ||
9 | |||
10 | killall -q peertube || true | ||
11 | |||
12 | if [ "$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 | ||
19 | elif [ "$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 | ||
23 | elif [ "$1" = "api-1" ]; then | ||
24 | npm run build:server | ||
25 | sh ./server/tests/api/ci-1.sh 2 | ||
26 | elif [ "$1" = "api-2" ]; then | ||
27 | npm run build:server | ||
28 | sh ./server/tests/api/ci-2.sh 2 | ||
29 | elif [ "$1" = "api-3" ]; then | ||
30 | npm run build:server | ||
31 | sh ./server/tests/api/ci-3.sh 2 | ||
32 | elif [ "$1" = "api-4" ]; then | ||
33 | npm run build:server | ||
34 | sh ./server/tests/api/ci-4.sh 2 | ||
35 | elif [ "$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 | ) | ||
41 | fi | ||