From 15f25480dddca4ad2af10f1bb96b4c8858cd4335 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 31 Oct 2017 17:50:28 +0100 Subject: [PATCH] Split slow and fast api tests for travis --- .travis.yml | 3 ++- scripts/travis.sh | 6 ++++++ server/tests/api/index-fast.ts | 13 +++++++++++++ server/tests/api/index-slow.ts | 4 ++++ server/tests/api/index.ts | 17 ++--------------- 5 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 server/tests/api/index-fast.ts create mode 100644 server/tests/api/index-slow.ts diff --git a/.travis.yml b/.travis.yml index 1ae32a1f9..bb7e2c130 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,8 @@ before_script: matrix: include: - env: TEST_SUITE=client - - env: TEST_SUITE=api + - env: TEST_SUITE=api-fast + - env: TEST_SUITE=api-slow - env: TEST_SUITE=cli - env: TEST_SUITE=lint 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 elif [ "$1" = "cli" ]; then npm run build:server mocha --exit --require ts-node/register --bail server/tests/cli/index.ts +elif [ "$1" = "api-fast" ]; then + npm run build:server + mocha --exit --require ts-node/register --bail server/tests/api/index-fast.ts +elif [ "$1" = "api-slow" ]; then + npm run build:server + mocha --exit --require ts-node/register --bail server/tests/api/index-slow.ts elif [ "$1" = "lint" ]; then cd client || exit -1 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 @@ +// Order of the tests we want to execute +import './config' +import './check-params' +import './friends-basic' +import './users' +import './single-pod' +import './video-abuse' +import './video-blacklist' +import './video-blacklist-management' +import './video-description' +import './video-privacy' +import './services' +import './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 @@ +// Order of the tests we want to execute +import './multiple-pods' +import './friends-advanced' +import './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 @@ // Order of the tests we want to execute -import './config' -import './check-params' -import './friends-basic' -import './users' -import './single-pod' -import './video-abuse' -import './video-blacklist' -import './video-blacklist-management' -import './video-description' -import './video-privacy' -import './multiple-pods' -import './services' -import './request-schedulers' -import './friends-advanced' -import './video-transcoder' +import './index-fast' +import './index-slow' -- 2.41.0