diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 17:23:57 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 17:23:57 +0100 |
commit | 18530063feb3326369bf3871248b04de0ce4d2af (patch) | |
tree | 1b40e2cdb9d322eb34765642c161aca4edcd4a74 /scripts/travis.sh | |
parent | 7a8032bb6d1d2fdfce9b23af13c3ed1cdfac91e9 (diff) | |
download | PeerTube-18530063feb3326369bf3871248b04de0ce4d2af.tar.gz PeerTube-18530063feb3326369bf3871248b04de0ce4d2af.tar.zst PeerTube-18530063feb3326369bf3871248b04de0ce4d2af.zip |
Try matrix to speed up travis builds
Diffstat (limited to 'scripts/travis.sh')
-rwxr-xr-x | scripts/travis.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/travis.sh b/scripts/travis.sh new file mode 100755 index 000000000..e919f18a4 --- /dev/null +++ b/scripts/travis.sh | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | if [ $# -eq 0 ]; then | ||
4 | echo "Need test suite argument." | ||
5 | exit -1 | ||
6 | fi | ||
7 | |||
8 | if [ "$1" = "build_then_client" ]; then | ||
9 | npm run build | ||
10 | mocha --exit --require ts-node/register --bail server/tests/client.ts | ||
11 | elif [ "$1" = "client" ]; then | ||
12 | mocha --exit --require ts-node/register --bail server/tests/client.ts | ||
13 | elif [ "$1" = "api" ]; then | ||
14 | mocha --exit --require ts-node/register --bail server/tests/api/index.ts | ||
15 | elif [ "$1" = "cli" ]; then | ||
16 | mocha --exit --require ts-node/register --bail server/tests/cli/index.ts | ||
17 | elif [ "$1" = "lint" ]; then | ||
18 | cd client || exit -1 | ||
19 | npm run lint || exit -1 | ||
20 | |||
21 | cd .. || exit -1 | ||
22 | npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1 | ||
23 | fi | ||