mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 04:56:14 +01:00
add 2 new stages: sh-check (which run shellcheck) and py-check (which run black and flake8)
The debian docker have been modified to install these tools. Closes #2046 Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
This commit is contained in:
parent
728c591d76
commit
8f45fbdadd
@ -12,7 +12,7 @@ cache:
|
||||
variables:
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v9"
|
||||
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v1"
|
||||
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v6"
|
||||
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v7"
|
||||
ANDROID_IMAGE: "registry.gitlab.gnome.org/gnome/glib/android-ndk:v3"
|
||||
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v2"
|
||||
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
||||
@ -40,6 +40,29 @@ variables:
|
||||
only:
|
||||
- schedules
|
||||
|
||||
sh-check:
|
||||
extends: .only-default
|
||||
image: $DEBIAN_IMAGE
|
||||
stage: style-check
|
||||
allow_failure: true
|
||||
script:
|
||||
- .gitlab-ci/run-shellcheck.sh
|
||||
only:
|
||||
changes:
|
||||
- "**/*.sh"
|
||||
|
||||
py-check:
|
||||
extends: .only-default
|
||||
image: $DEBIAN_IMAGE
|
||||
stage: style-check
|
||||
allow_failure: true
|
||||
script:
|
||||
- .gitlab-ci/run-black.sh
|
||||
- .gitlab-ci/run-flake8.sh
|
||||
only:
|
||||
changes:
|
||||
- "**/*.py"
|
||||
|
||||
style-check-diff:
|
||||
extends: .only-default
|
||||
image: $DEBIAN_IMAGE
|
||||
|
@ -2,6 +2,7 @@ FROM debian:buster
|
||||
|
||||
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
bindfs \
|
||||
black \
|
||||
clang \
|
||||
clang-tools-7 \
|
||||
clang-format-7 \
|
||||
@ -9,6 +10,7 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
desktop-file-utils \
|
||||
elfutils \
|
||||
findutils \
|
||||
flake8 \
|
||||
fuse \
|
||||
gcc \
|
||||
g++ \
|
||||
@ -36,6 +38,7 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
shared-mime-info \
|
||||
shellcheck \
|
||||
systemtap-sdt-dev \
|
||||
unzip \
|
||||
wget \
|
||||
|
5
.gitlab-ci/run-black.sh
Executable file
5
.gitlab-ci/run-black.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
black --diff --check $(git ls-files '*.py')
|
5
.gitlab-ci/run-flake8.sh
Executable file
5
.gitlab-ci/run-flake8.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
flake8 --max-line-length=88 $(git ls-files '*.py')
|
6
.gitlab-ci/run-shellcheck.sh
Executable file
6
.gitlab-ci/run-shellcheck.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Ignoring third-party directories that we don't want to parse
|
||||
shellcheck $(git ls-files '*.sh' | grep -Ev "glib/libcharset|glib/dirent")
|
Loading…
Reference in New Issue
Block a user