]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - scripts/travis.sh
Make it works with new autoplay policy
[github/Chocobozzz/PeerTube.git] / scripts / travis.sh
... / ...
CommitLineData
1#!/bin/sh
2
3set -eu
4
5if [ $# -eq 0 ]; then
6 echo "Need test suite argument."
7 exit -1
8fi
9
10if [ "$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
13elif [ "$1" = "api" ]; then
14 npm run build:server
15 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index.ts
16elif [ "$1" = "cli" ]; then
17 npm run build:server
18 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/cli/index.ts
19elif [ "$1" = "api-fast" ]; then
20 npm run build:server
21 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-fast.ts
22elif [ "$1" = "api-slow" ]; then
23 npm run build:server
24 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-slow.ts
25elif [ "$1" = "lint" ]; then
26 ( cd client
27 npm run lint
28 )
29
30 npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts"
31fi