]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/ci.sh
Bind expanded rows to item ids instead of row number
[github/Chocobozzz/PeerTube.git] / scripts / ci.sh
CommitLineData
0e4ffb4b
LA
1#!/bin/sh
2
3set -eu
18530063
C
4
5if [ $# -eq 0 ]; then
6 echo "Need test suite argument."
7 exit -1
8fi
9
365b546c
C
10killall -q peertube || true
11
36619ac8 12perl -0777 -i -pe 's#proxy:(\n\s+)enabled: false\n\s+url: ""#proxy:$1enabled: true$1url: "http://188.165.225.149:7899"#' config/test.yaml
be7ca0c6 13
98ec8b8e 14if [ "$1" = "misc" ]; then
144c6559 15 npm run build -- --light
4c8ef0ec 16 mocha --timeout 5000 --exit --require ts-node/register --require tsconfig-paths/register --bail server/tests/client.ts \
0e5ff97f
BY
17 server/tests/feeds/index.ts \
18 server/tests/misc-endpoints.ts \
9b474844
C
19 server/tests/helpers/index.ts \
20 server/tests/plugins/index.ts
18530063 21elif [ "$1" = "cli" ]; then
1b6b4757 22 npm run build:server
46b2cec7 23 CC=gcc-4.9 CXX=g++-4.9 npm run setup:cli
4c8ef0ec 24 mocha --timeout 5000 --exit --require ts-node/register --require tsconfig-paths/register --bail server/tests/cli/index.ts
1297eb5d 25elif [ "$1" = "api-1" ]; then
15f25480 26 npm run build:server
2284f202 27 sh ./server/tests/api/ci-1.sh 2
1297eb5d 28elif [ "$1" = "api-2" ]; then
15f25480 29 npm run build:server
2284f202 30 sh ./server/tests/api/ci-2.sh 2
1297eb5d
C
31elif [ "$1" = "api-3" ]; then
32 npm run build:server
2284f202 33 sh ./server/tests/api/ci-3.sh 2
2fbe7f19 34elif [ "$1" = "api-4" ]; then
46b2cec7 35 npm run build:server
2284f202 36 sh ./server/tests/api/ci-4.sh 2
18530063 37elif [ "$1" = "lint" ]; then
a1587156 38 npm run eslint -- --ext .ts "server/**/*.ts" "shared/**/*.ts"
a3705089 39 npm run swagger-cli -- validate support/doc/api/openapi.yaml
f2659ae0 40
0e4ffb4b
LA
41 ( cd client
42 npm run lint
43 )
18530063 44fi
be7ca0c6
C
45
46git checkout -- config/test.yaml