travis.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. set -eu
  3. if [ $# -eq 0 ]; then
  4. echo "Need test suite argument."
  5. exit -1
  6. fi
  7. killall -q peertube || true
  8. if [ "$1" = "misc" ]; then
  9. npm run build -- --light-fr
  10. mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/client.ts \
  11. server/tests/feeds/index.ts \
  12. server/tests/misc-endpoints.ts \
  13. server/tests/helpers/index.ts
  14. elif [ "$1" = "cli" ]; then
  15. npm run build:server
  16. CC=gcc-4.9 CXX=g++-4.9 npm run setup:cli
  17. mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/cli/index.ts
  18. elif [ "$1" = "api-1" ]; then
  19. npm run build:server
  20. sh ./server/tests/api/travis-1.sh 2
  21. elif [ "$1" = "api-2" ]; then
  22. npm run build:server
  23. sh ./server/tests/api/travis-2.sh 2
  24. elif [ "$1" = "api-3" ]; then
  25. npm run build:server
  26. sh ./server/tests/api/travis-3.sh 2
  27. elif [ "$1" = "api-4" ]; then
  28. npm run build:server
  29. sh ./server/tests/api/travis-4.sh 2
  30. elif [ "$1" = "lint" ]; then
  31. npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts"
  32. ( cd client
  33. npm run lint
  34. )
  35. fi