From f9fe87f2cb8c1e55dc0b042d66cc48cbe2dff33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 14 Jul 2024 09:20:25 +0200 Subject: [PATCH] Do not run concurrently tests for some modules Closes #13395 (grafted from eb160def705d0a300b44541d23c14878923d3e0c) --HG-- branch : 6.0 --- .gitlab-ci-modules.yml | 2 ++ .gitlab-scripts/generate-ci.py | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci-modules.yml b/.gitlab-ci-modules.yml index 6530f98b3c..f2810932e0 100644 --- a/.gitlab-ci-modules.yml +++ b/.gitlab-ci-modules.yml @@ -468,12 +468,14 @@ test-modules-account_payment_stripe-sqlite: variables: PACKAGE: modules/account_payment_stripe TAG_PATTERN: '/^account_payment_stripe-.*/' + resource_group: stripe test-modules-account_payment_stripe-postgresql: extends: .test-postgresql variables: PACKAGE: modules/account_payment_stripe TAG_PATTERN: '/^account_payment_stripe-.*/' + resource_group: stripe check-doc-modules-account_product: extends: .check-doc diff --git a/.gitlab-scripts/generate-ci.py b/.gitlab-scripts/generate-ci.py index 3814509cbd..a445378e0f 100755 --- a/.gitlab-scripts/generate-ci.py +++ b/.gitlab-scripts/generate-ci.py @@ -17,13 +17,17 @@ test-${name}-sqlite: variables: PACKAGE: ${package} TAG_PATTERN: '/^${tag_name}-.*/' - +${extra} test-${name}-postgresql: extends: .test-postgresql variables: PACKAGE: ${package} TAG_PATTERN: '/^${tag_name}-.*/' -""") +${extra}""") +RESOURCE_GROUPS = { + 'account_payment_stripe': 'stripe', + 'web_shop_shopify': 'shopify', + } def main(filename): @@ -40,10 +44,15 @@ def render(file): name = tag_name = package.replace('/', '-') if tag_name.startswith('modules-'): tag_name = tag_name[len('modules-'):] + if resource_group := RESOURCE_GROUPS.get(tag_name): + extra = ' resource_group: ' + resource_group + '\n' + else: + extra = '' mapping = { 'name': name, 'package': package, 'tag_name': tag_name, + 'extra': extra, } file.write(TEMPLATE.substitute(mapping))