From 17b8e5b60b4e85a4ab4ab028d0e86b75e2749bab Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Tue, 26 Mar 2024 16:56:04 +0100 Subject: [PATCH] [full-ci]chore: bump web to v9.0.0-alpha.3 (#8736) * chore: bump web to v9.0.0-alpha.3 * ci(e2e): use e2e runner to run the tests * ci(e2e): fix e2e run command * ci(e2e): fix e2e run command * chore: adjust changelog item for Web 9.0.0 * Update .drone.env --------- Co-authored-by: Saw-jan Co-authored-by: Jannik Stehle --- .drone.env | 2 +- .drone.star | 123 +++++++++++++++-------- changelog/unreleased/update-web-9.0.0.md | 14 ++- services/web/Makefile | 2 +- 4 files changed, 94 insertions(+), 47 deletions(-) diff --git a/.drone.env b/.drone.env index 7bff7faf7..857882eb9 100644 --- a/.drone.env +++ b/.drone.env @@ -1,3 +1,3 @@ # The test runner source for UI tests -WEB_COMMITID=4210a0817386127d3345eaf5fd70a2e0d1ef9f99 +WEB_COMMITID=ffa48729dd7d109b8b8b7cc094ed4d18021a3fbe WEB_BRANCH=master diff --git a/.drone.star b/.drone.star index 97f3bbbe2..16eea0cc4 100644 --- a/.drone.star +++ b/.drone.star @@ -140,7 +140,16 @@ config = { "skipExceptParts": [], }, "e2eTests": { - "skip": False, + "basic": { + "skip": False, + "totalParts": 3, # divide and run all suites in parts (divide pipelines) + "xsuites": ["search", "app-provider"], # suites to skip + }, + "search": { + "skip": False, + "suites": ["search"], # suites to run + "tikaNeeded": True, + }, }, "rocketchat": { "channel": "infinitescale", @@ -343,8 +352,7 @@ def testPipelines(ctx): if "skip" not in config["uiTests"] or not config["uiTests"]["skip"]: pipelines += uiTests(ctx) - if "skip" not in config["e2eTests"] or not config["e2eTests"]["skip"]: - pipelines += e2eTests(ctx) + pipelines += e2eTestPipeline(ctx) return pipelines @@ -1165,20 +1173,13 @@ def uiTestPipeline(ctx, filterTags, runPart = 1, numberOfParts = 1, storage = "o }, } -def e2eTests(ctx): - test_suites = { - "suite1": { - "path": "tests/e2e/cucumber/features/{smoke,journeys}/*.feature", - "tikaNeeded": False, - }, - "suite2": { - "path": "tests/e2e/cucumber/features/smoke/{spaces,admin-settings}/*.feature", - "tikaNeeded": False, - }, - "suite3": { - "path": "tests/e2e/cucumber/features/smoke/{search,shares}/*.feature", - "tikaNeeded": True, - }, +def e2eTestPipeline(ctx): + defaults = { + "skip": False, + "suites": [], + "xsuites": [], + "totalParts": 0, + "tikaNeeded": False, } extra_server_environment = { @@ -1207,40 +1208,80 @@ def e2eTests(ctx): pipelines = [] if ("skip-e2e" in ctx.build.title.lower()): - return [] + return pipelines - for name, suite in test_suites.items(): - steps = \ + if (ctx.build.event == "tag"): + return pipelines + + for name, suite in config["e2eTests"].items(): + if "skip" in suite and suite["skip"]: + return pipelines + + params = {} + for item in defaults: + params[item] = suite[item] if item in suite else defaults[item] + + e2e_args = "" + if params["totalParts"] > 0: + e2e_args = "--total-parts %d" % params["totalParts"] + elif params["suites"]: + e2e_args = "--suites %s" % ",".join(params["suites"]) + + # suites to skip + if params["xsuites"]: + e2e_args += " --xsuites %s" % ",".join(params["xsuites"]) + + steps_before = \ skipIfUnchanged(ctx, "e2e-tests") + \ restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") + \ restoreWebCache() + \ restoreWebPnpmCache() + \ - (tikaService() if suite["tikaNeeded"] else []) + \ - ocisServer("ocis", 4, [], extra_server_environment = extra_server_environment, tika_enabled = suite["tikaNeeded"]) + \ - [{ - "name": "e2e-tests", - "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION, - "environment": { - "BASE_URL_OCIS": "ocis-server:9200", - "HEADLESS": "true", - "RETRY": "1", - "WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["ocisConfig"]), - "LOCAL_UPLOAD_DIR": "/uploads", - }, - "commands": [ - "cd %s" % dirs["web"], - "pnpm test:e2e:cucumber %s" % suite["path"], - ], - }] + \ - uploadTracingResult(ctx) + \ - logTracingResults() + (tikaService() if params["tikaNeeded"] else []) + \ + ocisServer("ocis", 4, [], extra_server_environment = extra_server_environment, tika_enabled = params["tikaNeeded"]) - if (ctx.build.event != "tag"): + step_e2e = { + "name": "e2e-tests", + "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION, + "environment": { + "BASE_URL_OCIS": "ocis-server:9200", + "HEADLESS": "true", + "RETRY": "1", + "WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["ocisConfig"]), + "LOCAL_UPLOAD_DIR": "/uploads", + }, + "commands": [ + "cd %s/tests/e2e" % dirs["web"], + ], + } + + steps_after = uploadTracingResult(ctx) + \ + logTracingResults() + + if params["totalParts"]: + for index in range(params["totalParts"]): + run_part = index + 1 + run_e2e = {} + run_e2e.update(step_e2e) + run_e2e["commands"] = [ + "cd %s/tests/e2e" % dirs["web"], + "bash run-e2e.sh %s --run-part %d" % (e2e_args, run_part), + ] + pipelines.append({ + "kind": "pipeline", + "type": "docker", + "name": "e2e-tests-%s-%s" % (name, run_part), + "steps": steps_before + [run_e2e] + steps_after, + "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)] + buildWebCache(ctx)), + "trigger": e2e_trigger, + "volumes": e2e_volumes, + }) + else: + step_e2e["commands"].append("bash run-e2e.sh %s" % e2e_args) pipelines.append({ "kind": "pipeline", "type": "docker", "name": "e2e-tests-%s" % name, - "steps": steps, + "steps": steps_before + [step_e2e] + steps_after, "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)] + buildWebCache(ctx)), "trigger": e2e_trigger, "volumes": e2e_volumes, diff --git a/changelog/unreleased/update-web-9.0.0.md b/changelog/unreleased/update-web-9.0.0.md index f6c4d88a0..d8862440e 100644 --- a/changelog/unreleased/update-web-9.0.0.md +++ b/changelog/unreleased/update-web-9.0.0.md @@ -1,8 +1,8 @@ -Enhancement: Update web to v9.0.0-alpha.2 +Enhancement: Update web to v9.0.0-alpha.3 Tags: web -We updated ownCloud Web to v9.0.0-alpha.2. Please refer to the changelog (linked) for details on the web release. +We updated ownCloud Web to v9.0.0-alpha.3. Please refer to the changelog (linked) for details on the web release. ## Summary * Bugfix [owncloud/web#10377](https://github.com/owncloud/web/pull/10377): User data not updated while altering own user @@ -26,6 +26,12 @@ We updated ownCloud Web to v9.0.0-alpha.2. Please refer to the changelog (linked * Enhancement [owncloud/web#10519](https://github.com/owncloud/web/pull/10519): Warn user before closing browser when upload is in progress * Enhancement [owncloud/web#10544](https://github.com/owncloud/web/pull/10544): Show locked and processing next to other status indicators * Enhancement [owncloud/web#10546](https://github.com/owncloud/web/pull/10546): Set emoji as space icon +* Enhancement [owncloud/web#10624](https://github.com/owncloud/web/pull/10624): Add details panel to trash +* Enhancement [owncloud/web#10586](https://github.com/owncloud/web/pull/10586): Add SSE events for locking, renaming, deleting, and restoring +* Enhancement [owncloud/web#10626](https://github.com/owncloud/web/pull/10626): Full text search default +* Enhancement [owncloud/web#10611](https://github.com/owncloud/web/pull/10611): Remember left nav bar state +* Enhancement [owncloud/web#10612](https://github.com/owncloud/web/pull/10612): Remember right nav bar state +* Enhancement [owncloud/web#10558](https://github.com/owncloud/web/pull/10558): Tile sizes -https://github.com/owncloud/ocis/pull/8634 -https://github.com/owncloud/web/releases/tag/v9.0.0-alpha.2 +https://github.com/owncloud/ocis/pull/8736 +https://github.com/owncloud/web/releases/tag/v9.0.0-alpha.3 diff --git a/services/web/Makefile b/services/web/Makefile index c9caa1c2b..8fd99e3ea 100644 --- a/services/web/Makefile +++ b/services/web/Makefile @@ -1,6 +1,6 @@ SHELL := bash NAME := web -WEB_ASSETS_VERSION = v9.0.0-alpha.2 +WEB_ASSETS_VERSION = v9.0.0-alpha.3 include ../../.make/recursion.mk