]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/travis.sh
Update shebang and date format for working on FreeBSD (fix typo)
[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
c710f90a 10 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/client.ts server/tests/activitypub.ts
18530063 11elif [ "$1" = "api" ]; then
1b6b4757 12 npm run build:server
c710f90a 13 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index.ts
18530063 14elif [ "$1" = "cli" ]; then
1b6b4757 15 npm run build:server
c710f90a 16 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/cli/index.ts
15f25480
C
17elif [ "$1" = "api-fast" ]; then
18 npm run build:server
c710f90a 19 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-fast.ts
15f25480
C
20elif [ "$1" = "api-slow" ]; then
21 npm run build:server
c710f90a 22 mocha --timeout 5000 --exit --require ts-node/register/type-check --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
dfecb900 28 npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts" || exit -1
18530063 29fi