From bffec3b39a491a92e811ec68d990f8273f01d7e0 Mon Sep 17 00:00:00 2001 From: Tobias Reiher Date: Tue, 22 Aug 2023 19:17:59 +0200 Subject: [PATCH] Add checking for dependency changes in CI Ref. eng/recordflux/RecordFlux#1341 --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56485ee29..050b8c0fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,6 +122,21 @@ changelog: git diff --name-only origin/main..HEAD | sed -n '/CHANGELOG.md/{:a $q0; n; ba}; ${s/.*/No entry added to CHANGELOG.md/p;q1}'; fi +anod: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + script: + - | + if [[ "$CI_MERGE_REQUEST_LABELS" != *"Anod"* ]]; then + git fetch origin main; + echo > /tmp/setup.py-diff ' + sed -z "s/.*install_requires=\[\s*\([^]]*\)],\s*extras_require={\([^}]*\)}.*/\1\2/" $1 > $1.a + sed -z "s/.*install_requires=\[\s*\([^]]*\)],\s*extras_require={\([^}]*\)}.*/\1\2/" $2 > $2.b + diff -u -w $1.a $2.b + '; + git difftool -y -x '/bin/bash -eu /tmp/setup.py-diff' --trust-exit-code HEAD origin/main -- setup.py + fi + commit_messages: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event'