]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/ci.sh
Handle async validators
[github/Chocobozzz/PeerTube.git] / scripts / ci.sh
index 7862888b8e2e019176846ea71da52fda57d50bd1..b0b76ca99e1b978f963ce3009b474b92d5271bfb 100755 (executable)
@@ -7,8 +7,6 @@ if [ $# -eq 0 ]; then
     exit -1
 fi
 
-killall -q peertube || true
-
 retries=3
 
 runTest () {
@@ -42,7 +40,10 @@ findTestFiles () {
     find $1 -type f -name "*.js" $exception | xargs echo
 }
 
-if [ "$1" = "client" ]; then
+if [ "$1" = "types-package" ]; then
+    npm run generate-types-package 0.0.0
+    npm run tsc -- --noEmit --esModuleInterop packages/types/tests/test.ts
+elif [ "$1" = "client" ]; then
     npm run build
 
     feedsFiles=$(findTestFiles ./dist/server/tests/feeds)
@@ -77,7 +78,7 @@ elif [ "$1" = "api-2" ]; then
     serverFiles=$(findTestFiles ./dist/server/tests/api/server)
     usersFiles=$(findTestFiles ./dist/server/tests/api/users)
 
-    MOCHA_PARALLEL=true runTest "$1" 3 $serverFiles $usersFiles $liveFiles
+    MOCHA_PARALLEL=true runTest "$1" 3 $liveFiles $serverFiles $usersFiles
 elif [ "$1" = "api-3" ]; then
     npm run build:server
 
@@ -89,9 +90,10 @@ elif [ "$1" = "api-4" ]; then
 
     moderationFiles=$(findTestFiles ./dist/server/tests/api/moderation)
     redundancyFiles=$(findTestFiles ./dist/server/tests/api/redundancy)
+    objectStorageFiles=$(findTestFiles ./dist/server/tests/api/object-storage)
     activitypubFiles=$(findTestFiles ./dist/server/tests/api/activitypub)
 
-    MOCHA_PARALLEL=true TS_NODE_FILES=true runTest "$1" 2 $moderationFiles $redundancyFiles $activitypubFiles
+    MOCHA_PARALLEL=true runTest "$1" 2 $moderationFiles $redundancyFiles $activitypubFiles $objectStorageFiles
 elif [ "$1" = "external-plugins" ]; then
     npm run build:server