aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-31 17:50:28 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-10-31 17:50:28 +0100
commit15f25480dddca4ad2af10f1bb96b4c8858cd4335 (patch)
tree0244e7e8e7687bd0d2443ad06c754a0ba1b9ff7c
parentc8dc45d7337020902e3c177580a1060b9fa3297f (diff)
downloadPeerTube-15f25480dddca4ad2af10f1bb96b4c8858cd4335.tar.gz
PeerTube-15f25480dddca4ad2af10f1bb96b4c8858cd4335.tar.zst
PeerTube-15f25480dddca4ad2af10f1bb96b4c8858cd4335.zip
Split slow and fast api tests for travis
-rw-r--r--.travis.yml3
-rwxr-xr-xscripts/travis.sh6
-rw-r--r--server/tests/api/index-fast.ts13
-rw-r--r--server/tests/api/index-slow.ts4
-rw-r--r--server/tests/api/index.ts17
5 files changed, 27 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml
index 1ae32a1f9..bb7e2c130 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,8 @@ before_script:
39matrix: 39matrix:
40 include: 40 include:
41 - env: TEST_SUITE=client 41 - env: TEST_SUITE=client
42 - env: TEST_SUITE=api 42 - env: TEST_SUITE=api-fast
43 - env: TEST_SUITE=api-slow
43 - env: TEST_SUITE=cli 44 - env: TEST_SUITE=cli
44 - env: TEST_SUITE=lint 45 - env: TEST_SUITE=lint
45 46
diff --git a/scripts/travis.sh b/scripts/travis.sh
index f6cdda463..e0a59806a 100755
--- a/scripts/travis.sh
+++ b/scripts/travis.sh
@@ -14,6 +14,12 @@ elif [ "$1" = "api" ]; then
14elif [ "$1" = "cli" ]; then 14elif [ "$1" = "cli" ]; then
15 npm run build:server 15 npm run build:server
16 mocha --exit --require ts-node/register --bail server/tests/cli/index.ts 16 mocha --exit --require ts-node/register --bail server/tests/cli/index.ts
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
17elif [ "$1" = "lint" ]; then 23elif [ "$1" = "lint" ]; then
18 cd client || exit -1 24 cd client || exit -1
19 npm run lint || exit -1 25 npm run lint || exit -1
diff --git a/server/tests/api/index-fast.ts b/server/tests/api/index-fast.ts
new file mode 100644
index 000000000..f13d8155d
--- /dev/null
+++ b/server/tests/api/index-fast.ts
@@ -0,0 +1,13 @@
1// Order of the tests we want to execute
2import './config'
3import './check-params'
4import './friends-basic'
5import './users'
6import './single-pod'
7import './video-abuse'
8import './video-blacklist'
9import './video-blacklist-management'
10import './video-description'
11import './video-privacy'
12import './services'
13import './request-schedulers'
diff --git a/server/tests/api/index-slow.ts b/server/tests/api/index-slow.ts
new file mode 100644
index 000000000..e3b50e57a
--- /dev/null
+++ b/server/tests/api/index-slow.ts
@@ -0,0 +1,4 @@
1// Order of the tests we want to execute
2import './multiple-pods'
3import './friends-advanced'
4import './video-transcoder'
diff --git a/server/tests/api/index.ts b/server/tests/api/index.ts
index 371f1bc43..258502d26 100644
--- a/server/tests/api/index.ts
+++ b/server/tests/api/index.ts
@@ -1,16 +1,3 @@
1// Order of the tests we want to execute 1// Order of the tests we want to execute
2import './config' 2import './index-fast'
3import './check-params' 3import './index-slow'
4import './friends-basic'
5import './users'
6import './single-pod'
7import './video-abuse'
8import './video-blacklist'
9import './video-blacklist-management'
10import './video-description'
11import './video-privacy'
12import './multiple-pods'
13import './services'
14import './request-schedulers'
15import './friends-advanced'
16import './video-transcoder'