From e8f72a2e4b6b1978ae2cee095ea636664d639038 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 29 Sep 2020 09:38:15 +0200 Subject: [PATCH] gitlab-ci: combine tests for checkpatch/black/msgfmt and nm-code-format.sh There is no need spawn up two containers (and install similar packages, doing so is resource intensive), to run two different tests. We can run them in the same container. At this point Fedora 33 is not yet fully released. But it will happen soon, so the image is stable enough for these kinds of tests (and will only get more stable in the following weeks). Also no longer collect an artifact with the test output. The test output is already nicely visible in the gitlab-ci UI. No need to collect it separately. --- .gitlab-ci.yml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65dfe15b9d..e4708e3ca0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,30 +74,15 @@ stages: - date '+%Y%m%d-%H%M%S'; test "$NM_BUILD_TARBALL" != 1 || mv /tmp/NetworkManager-1*.tar.xz /tmp/NetworkManager-1*.src.rpm ./ checkpatch: - image: fedora:32 - stage: test - script: - - date '+%Y%m%d-%H%M%S'; dnf install -y git black gettext /usr/bin/xargs - - date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh 2>&1 | tee checkpatch-out.txt - - date '+%Y%m%d-%H%M%S'; black --check . examples/python/gi/nm-wg-set - - date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc - allow_failure: true - artifacts: - when: on_failure - paths: - - checkpatch-out.txt - -code-style: image: fedora:33 stage: test script: - - date '+%Y%m%d-%H%M%S'; dnf install -y git which clang - - date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-code-format.sh 2>&1 | tee nm-code-format-out.txt + - date '+%Y%m%d-%H%M%S'; dnf install -y git black gettext /usr/bin/xargs which clang + - date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh + - date '+%Y%m%d-%H%M%S'; black --check . examples/python/gi/nm-wg-set + - date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc + - date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-code-format.sh allow_failure: true - artifacts: - when: on_failure - paths: - - nm-code-format-out.txt t_fedora:28: <<: *fedora_install