From 964f49b257b1ed601b571b7ca52c6580ac040ae3 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 4 Aug 2021 11:00:27 +0200 Subject: [PATCH] [ci] Extracted clang-format into own job. --- scripts/ci/jobs/pre-commit.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/ci/jobs/pre-commit.yml b/scripts/ci/jobs/pre-commit.yml index 4450e402f8a..f49d071eb8d 100644 --- a/scripts/ci/jobs/pre-commit.yml +++ b/scripts/ci/jobs/pre-commit.yml @@ -2,10 +2,20 @@ pre commit: stage: preparation image: $PRECOMMIT_IMAGE needs: [ci_images] - allow_failure: true + variables: + SKIP: clang-format script: - pre-commit install - pre-commit run --from-ref `git merge-base origin/master HEAD` --to-ref HEAD - git diff --check `git merge-base origin/master HEAD` HEAD -- . ':!*.md' ':!*.pandoc' ':!*.asc' ':!*.dat' ':!*.ts' + +clang-format: + stage: check + image: $PRECOMMIT_IMAGE + needs: [ci_images] + allow_failure: true + script: + - pre-commit install + - pre-commit run clang-format --from-ref `git merge-base origin/master HEAD` --to-ref HEAD after_script: - git diff -- GitLab