From d22035f8974ac51ae1b6efc0e2b3749ca0a674ff Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Fri, 2 May 2025 11:24:38 +0200 Subject: [PATCH] ci: add job to test that the generated client is up to date --- .gitlab-ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f57ec9b0..d3713913 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ variables: value: main CHILD_PIPELINE_BRANCH: $CI_DEFAULT_BRANCH CHECK_PKG_VERSIONS: - description: Whether to run additional tests against min/max/random selection of dependencies. Set to 1 for running. + description: Whether to run additional tests against min/max/random selection of dependencies. Set to 1 for running. value: 0 workflow: @@ -162,6 +162,20 @@ tests: - tests/reference_failures/ when: always +generate-client-check: + stage: test + needs: [] + variables: + QT_QPA_PLATFORM: "offscreen" + script: + - *clone-repos + - *install-os-packages + - *install-repos + - pip install -e .[dev,pyside6] + - bw-generate-cli --target bec_widgets + # if there are changes in the generated files, fail the job + - git diff --exit-code + test-matrix: parallel: matrix: @@ -231,7 +245,7 @@ end-2-end-conda: - if: '$CI_PIPELINE_SOURCE == "parent_pipeline"' - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"' - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "production"' - - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^pre_release.*$/' + - if: "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^pre_release.*$/" semver: stage: Deploy