]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/ci.sh
More specific message when signup is not allowed
[github/Chocobozzz/PeerTube.git] / scripts / ci.sh
index 2dd5e25cebad049b4ab172d902a5e82b491431c8..9fb67f634152c5ca11078271d3e5b88eaf28527c 100755 (executable)
@@ -27,7 +27,7 @@ runTest () {
         "echo Trying {} >> $joblog; npm run mocha -- -c --timeout 30000 --exit --bail {}" \
         ::: $files
 
-    cat "$joblog" | uniq -c
+    cat "$joblog" | sort | uniq -c
     rm "$joblog"
 }
 
@@ -56,6 +56,10 @@ elif [ "$1" = "client" ]; then
 
     MOCHA_PARALLEL=true runTest "$1" $((2*$speedFactor)) $feedsFiles $helperFiles $miscFiles $pluginFiles $libFiles
 elif [ "$1" = "cli-plugin" ]; then
+    # Simulate HTML
+    mkdir -p "./client/dist/en-US/"
+    cp "./client/src/index.html" "./client/dist/en-US/index.html"
+
     npm run build:server
     npm run setup:cli
 
@@ -100,14 +104,18 @@ elif [ "$1" = "api-5" ]; then
     npm run build:server
 
     transcodingFiles=$(findTestFiles ./dist/server/tests/api/transcoding)
+    runnersFiles=$(findTestFiles ./dist/server/tests/api/runners)
 
-    MOCHA_PARALLEL=true runTest "$1" $((2*$speedFactor)) $transcodingFiles
+    MOCHA_PARALLEL=true runTest "$1" $((2*$speedFactor)) $transcodingFiles $runnersFiles
 elif [ "$1" = "external-plugins" ]; then
     npm run build:server
+    npm run build:peertube-runner
 
     externalPluginsFiles=$(findTestFiles ./dist/server/tests/external-plugins)
+    peertubeRunnerFiles=$(findTestFiles ./dist/server/tests/peertube-runner)
 
     runTest "$1" 1 $externalPluginsFiles
+    MOCHA_PARALLEL=true runTest "$1" $((2*$speedFactor)) $peertubeRunnerFiles
 elif [ "$1" = "lint" ]; then
     npm run eslint -- --ext .ts "./server/**/*.ts" "shared/**/*.ts" "scripts/**/*.ts"
     npm run swagger-cli -- validate support/doc/api/openapi.yaml