ci: Run ruff check/format on gdctl
Use a CI job using ruff that enforces the coding style to follow `ruff format --line-length 80`, and that no new linting issues appear using `ruff check`. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190>
This commit is contained in:
parent
3cc5d201a2
commit
a0c5c09e9b
@ -105,7 +105,7 @@ variables:
|
||||
- .skip-git-clone
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: 41
|
||||
BASE_TAG: '2025-01-28.0'
|
||||
BASE_TAG: '2025-01-29.0'
|
||||
MUTTER_USER: 'meta-user'
|
||||
FDO_DISTRIBUTION_PACKAGES:
|
||||
clang
|
||||
@ -124,6 +124,7 @@ variables:
|
||||
zenity
|
||||
python3-dbusmock
|
||||
gnome-desktop-testing
|
||||
ruff
|
||||
|
||||
FDO_DISTRIBUTION_EXEC: |
|
||||
set -e
|
||||
@ -347,7 +348,7 @@ build-fedora-container@aarch64:
|
||||
- !reference [.pipeline-guard, rules]
|
||||
when: manual
|
||||
|
||||
check-code-style:
|
||||
check-c-code-style:
|
||||
extends:
|
||||
- .mutter.distribution-image
|
||||
- .mutter.fedora@x86_64
|
||||
@ -367,6 +368,23 @@ check-code-style:
|
||||
rules:
|
||||
- !reference [.only-merge-requests, rules]
|
||||
|
||||
check-python-code-style:
|
||||
extends:
|
||||
- .mutter.distribution-image
|
||||
- .mutter.fedora@x86_64
|
||||
variables:
|
||||
PYTHON_FILES:
|
||||
tools/gdctl
|
||||
stage: code-review
|
||||
needs:
|
||||
- job: build-fedora-container@x86_64
|
||||
artifacts: false
|
||||
script:
|
||||
- ruff format --line-length 80 --check $PYTHON_FILES
|
||||
- ruff check $PYTHON_FILES
|
||||
rules:
|
||||
- !reference [.only-merge-requests, rules]
|
||||
|
||||
.build-mutter-base:
|
||||
variables:
|
||||
BASE_MESON_OPTIONS:
|
||||
|
Loading…
x
Reference in New Issue
Block a user