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.
This commit is contained in:
Thomas Haller 2020-09-29 09:38:15 +02:00
parent 0e71236d08
commit e8f72a2e4b
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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