From 6ae1b56976139a78c8e3f35bc7038cba40181cc5 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Tue, 2 Aug 2022 13:32:21 +0200 Subject: [PATCH] try run test in webTestRunner --- .drone.env | 8 +++----- .drone.star | 26 +++++++++++++++++++------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.drone.env b/.drone.env index ea6674eda..d01d93d7d 100644 --- a/.drone.env +++ b/.drone.env @@ -2,9 +2,7 @@ CORE_COMMITID=8b15ef46e68cf73ea861d4f180ed1f6bff5096a8 CORE_BRANCH=master -# The test runner source for UI tests +# The test runner source for UI tests +# Matches the latest stable version on the web: v5.7.0-rc.5 WEB_COMMITID=0bb33e791f10f1afebfde4ea4da356e46ecdc201 -WEB_BRANCH=master - -# e2e tests use the latest stable version on web -WEB_ASSETS_VERSION=v5.7.0-rc.5 \ No newline at end of file +WEB_BRANCH=master \ No newline at end of file diff --git a/.drone.star b/.drone.star index 8c917878e..d5b75693e 100644 --- a/.drone.star +++ b/.drone.star @@ -321,6 +321,18 @@ def yarnInstallUITests(): ], }] +def yarnInstallE2eTests(): + return [{ + "name": "yarn-install-e2e", + "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION, + "commands": [ + ". /drone/src/.drone.env", + "cd webTestRunner", + "git checkout $WEB_COMMITID", + "retry -t 3 'yarn install --immutable'", + ], + }] + def testOcisModules(ctx): pipelines = [] for module in config["modules"]: @@ -874,16 +886,15 @@ def e2eTests(ctx): "LOCAL_UPLOAD_DIR": "/uploads", }, "commands": [ - ". /drone/src/.drone.env", - "git clone -b $WEB_ASSETS_VERSION --single-branch --no-tags https://github.com/owncloud/web.git e2eTests", - "cd e2eTests", - "retry -t 3 'yarn install --immutable'", + "cd webTestRunner", "sleep 10 && yarn test:e2e:cucumber tests/e2e/cucumber/**/*[!.oc10].feature", ], }] e2eTestsSteps = \ restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") + \ + restoreBuildArtifactCache(ctx, "web-dist", "webTestRunner") + \ + yarnInstallE2eTests() + \ ocisServer("ocis", 4, []) + \ e2e_test_ocis + \ uploadTracingResult(ctx) + \ @@ -914,8 +925,8 @@ def uploadTracingResult(ctx): "from_secret": "cache_public_s3_server", }, "path_style": True, - "source": "e2eTests/reports/e2e/playwright/tracing/**/*", - "strip_prefix": "e2eTests/reports/e2e/playwright/tracing", + "source": "webTestRunner/reports/e2e/playwright/tracing/**/*", + "strip_prefix": "webTestRunner/reports/e2e/playwright/tracing", "target": "${DRONE_BUILD_NUMBER}/tracing", }, "environment": { @@ -942,7 +953,7 @@ def publishTracingResult(ctx, suite): "name": "publish-tracing-result", "image": OC_UBUNTU, "commands": [ - "cd e2eTests/reports/e2e/playwright/tracing/", + "cd webTestRunner/reports/e2e/playwright/tracing/", 'echo "
:boom: To see the trace, please open the link in the console ...\\n\\n

\\n\\n" >> comments.file', 'for f in *.zip; do echo "#### npx playwright show-trace $CACHE_ENDPOINT/$CACHE_BUCKET/${DRONE_BUILD_NUMBER}/tracing/$f \n" >> comments.file; done', 'echo "\n

" >> comments.file', @@ -963,6 +974,7 @@ def publishTracingResult(ctx, suite): ], "event": [ "pull_request", + "cron", ], }, }]