]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/travis.sh
Add delete button to my videos
[github/Chocobozzz/PeerTube.git] / scripts / travis.sh
CommitLineData
18530063
C
1#!/bin/bash
2
3if [ $# -eq 0 ]; then
4 echo "Need test suite argument."
5 exit -1
6fi
7
98ec8b8e 8if [ "$1" = "misc" ]; then
18530063 9 npm run build
98ec8b8e 10 mocha --exit --require ts-node/register --bail server/tests/client.ts server/tests/activitypub.ts
18530063 11elif [ "$1" = "api" ]; then
1b6b4757 12 npm run build:server
18530063
C
13 mocha --exit --require ts-node/register --bail server/tests/api/index.ts
14elif [ "$1" = "cli" ]; then
1b6b4757 15 npm run build:server
18530063 16 mocha --exit --require ts-node/register --bail server/tests/cli/index.ts
15f25480
C
17elif [ "$1" = "api-fast" ]; then
18 npm run build:server
19 mocha --exit --require ts-node/register --bail server/tests/api/index-fast.ts
20elif [ "$1" = "api-slow" ]; then
21 npm run build:server
22 mocha --exit --require ts-node/register --bail server/tests/api/index-slow.ts
18530063
C
23elif [ "$1" = "lint" ]; then
24 cd client || exit -1
25 npm run lint || exit -1
26
27 cd .. || exit -1
28 npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1
29fi