From 1772b383de490cf406fe93ef3aa3a941f6db513c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Apr 2023 15:05:27 +0200 Subject: Add peertube runner cli --- scripts/build/peertube-runner.sh | 13 +++++++++++++ scripts/ci.sh | 7 +++++-- scripts/dev/peertube-runner.sh | 11 +++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 scripts/build/peertube-runner.sh create mode 100755 scripts/dev/peertube-runner.sh (limited to 'scripts') diff --git a/scripts/build/peertube-runner.sh b/scripts/build/peertube-runner.sh new file mode 100755 index 000000000..690031af5 --- /dev/null +++ b/scripts/build/peertube-runner.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -eu + + +cd ./packages/peertube-runner +rm -rf ./dist + +../../node_modules/.bin/tsc -b --verbose +rm -rf ./dist +mkdir ./dist + +./node_modules/.bin/esbuild ./peertube-runner.ts --bundle --platform=node --external:"./lib-cov/fluent-ffmpeg" --external:pg-hstore --outfile=dist/peertube-runner.js diff --git a/scripts/ci.sh b/scripts/ci.sh index 8b984093c..7b2e5d347 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -104,14 +104,17 @@ 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 + runTest "$1" 1 $externalPluginsFiles $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 diff --git a/scripts/dev/peertube-runner.sh b/scripts/dev/peertube-runner.sh new file mode 100755 index 000000000..e39259372 --- /dev/null +++ b/scripts/dev/peertube-runner.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -eu + +rm -rf ./packages/peertube-runner/dist + +cd ./packages/peertube-runner + +../../node_modules/.bin/concurrently -k \ + "../../node_modules/.bin/tsc -w --noEmit" \ + "./node_modules/.bin/esbuild ./peertube-runner.ts --bundle --sourcemap --platform=node --external:"./lib-cov/fluent-ffmpeg" --external:pg-hstore --watch --outfile=dist/peertube-runner.js" -- cgit v1.2.3