Add PEERTUBE_SMTP_DISABLE_STARTTLS config docker env
[oweals/peertube.git] / scripts / travis.sh
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 if [ "$1" = "misc" ]; then
11     npm run build
12     mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/client.ts server/tests/activitypub.ts \
13         server/tests/feeds/feeds.ts
14 elif [ "$1" = "api" ]; then
15     npm run build:server
16     mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index.ts
17 elif [ "$1" = "cli" ]; then
18     npm run build:server
19     mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/cli/index.ts
20 elif [ "$1" = "api-fast" ]; then
21     npm run build:server
22     mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-fast.ts
23 elif [ "$1" = "api-slow" ]; then
24     npm run build:server
25     mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-slow.ts
26 elif [ "$1" = "lint" ]; then
27     ( cd client
28       npm run lint
29     )
30
31     npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts"
32 fi