From 95faf1eafffff4fe1f74025092c7c3eef2951697 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 28 Feb 2022 15:56:51 +0100 Subject: [PATCH] Create another test suite for transcoding jobs --- .github/workflows/test.yml | 2 +- scripts/ci.sh | 6 ++++++ scripts/test.sh | 1 + server/tests/api/index.ts | 1 + server/tests/api/{videos => transcoding}/audio-only.ts | 0 .../create-transcoding.ts} | 0 .../tests/api/{videos/video-hls.ts => transcoding/hls.ts} | 0 server/tests/api/transcoding/index.ts | 5 +++++ .../video-transcoder.ts => transcoding/transcoder.ts} | 0 server/tests/api/{videos => transcoding}/video-editor.ts | 0 server/tests/api/videos/index.ts | 5 ----- 11 files changed, 14 insertions(+), 6 deletions(-) rename server/tests/api/{videos => transcoding}/audio-only.ts (100%) rename server/tests/api/{videos/video-create-transcoding.ts => transcoding/create-transcoding.ts} (100%) rename server/tests/api/{videos/video-hls.ts => transcoding/hls.ts} (100%) create mode 100644 server/tests/api/transcoding/index.ts rename server/tests/api/{videos/video-transcoder.ts => transcoding/transcoder.ts} (100%) rename server/tests/api/{videos => transcoding}/video-editor.ts (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ba2c549d..f0b9778b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - test_suite: [ types-package, client, api-1, api-2, api-3, api-4, cli-plugin, lint, external-plugins ] + test_suite: [ types-package, client, api-1, api-2, api-3, api-4, api-5, cli-plugin, lint, external-plugins ] env: PGUSER: peertube diff --git a/scripts/ci.sh b/scripts/ci.sh index 2bacf2a2e..5f1230d33 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -94,6 +94,12 @@ elif [ "$1" = "api-4" ]; then activitypubFiles=$(findTestFiles ./dist/server/tests/api/activitypub) MOCHA_PARALLEL=true runTest "$1" 2 $moderationFiles $redundancyFiles $activitypubFiles $objectStorageFiles +elif [ "$1" = "api-5" ]; then + npm run build:server + + transcodingFiles=$(findTestFiles ./dist/server/tests/api/transcoding) + + MOCHA_PARALLEL=true runTest "$1" 2 $transcodingFiles elif [ "$1" = "external-plugins" ]; then npm run build:server diff --git a/scripts/test.sh b/scripts/test.sh index 4d1d8720a..3b294b386 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -9,6 +9,7 @@ npm run ci -- api-1 npm run ci -- api-2 npm run ci -- api-3 npm run ci -- api-4 +npm run ci -- api-5 npm run ci -- external-plugins npm run ci -- lint diff --git a/server/tests/api/index.ts b/server/tests/api/index.ts index 19301c0b9..61352a134 100644 --- a/server/tests/api/index.ts +++ b/server/tests/api/index.ts @@ -7,5 +7,6 @@ import './notifications' import './redundancy' import './search' import './server' +import './transcoding' import './users' import './videos' diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/transcoding/audio-only.ts similarity index 100% rename from server/tests/api/videos/audio-only.ts rename to server/tests/api/transcoding/audio-only.ts diff --git a/server/tests/api/videos/video-create-transcoding.ts b/server/tests/api/transcoding/create-transcoding.ts similarity index 100% rename from server/tests/api/videos/video-create-transcoding.ts rename to server/tests/api/transcoding/create-transcoding.ts diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/transcoding/hls.ts similarity index 100% rename from server/tests/api/videos/video-hls.ts rename to server/tests/api/transcoding/hls.ts diff --git a/server/tests/api/transcoding/index.ts b/server/tests/api/transcoding/index.ts new file mode 100644 index 000000000..8a0a1d787 --- /dev/null +++ b/server/tests/api/transcoding/index.ts @@ -0,0 +1,5 @@ +export * from './audio-only' +export * from './create-transcoding' +export * from './hls' +export * from './transcoder' +export * from './video-editor' diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/transcoding/transcoder.ts similarity index 100% rename from server/tests/api/videos/video-transcoder.ts rename to server/tests/api/transcoding/transcoder.ts diff --git a/server/tests/api/videos/video-editor.ts b/server/tests/api/transcoding/video-editor.ts similarity index 100% rename from server/tests/api/videos/video-editor.ts rename to server/tests/api/transcoding/video-editor.ts diff --git a/server/tests/api/videos/index.ts b/server/tests/api/videos/index.ts index 72e6ae2b4..7dc826353 100644 --- a/server/tests/api/videos/index.ts +++ b/server/tests/api/videos/index.ts @@ -1,4 +1,3 @@ -import './audio-only' import './multiple-servers' import './resumable-upload' import './single-server' @@ -6,18 +5,14 @@ import './video-captions' import './video-change-ownership' import './video-channels' import './video-comments' -import './video-create-transcoding' import './video-description' -import './video-editor' import './video-files' -import './video-hls' import './video-imports' import './video-nsfw' import './video-playlists' import './video-playlist-thumbnails' import './video-privacy' import './video-schedule-update' -import './video-transcoder' import './videos-common-filters' import './videos-history' import './videos-overview'