summaryrefslogtreecommitdiffstats
path: root/debian/salsa-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to 'debian/salsa-ci.yml')
-rw-r--r--debian/salsa-ci.yml20
1 files changed, 17 insertions, 3 deletions
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
index 3062e82ef..0562e1d59 100644
--- a/debian/salsa-ci.yml
+++ b/debian/salsa-ci.yml
@@ -60,6 +60,7 @@ extract-source:
gpgv \
kernel-wedge \
python3 \
+ python3-dacite \
python3-debian \
python3-jinja2 \
quilt \
@@ -213,12 +214,25 @@ python-static:
script:
- |
apt-get update && eatmydata apt-get install --no-install-recommends -y \
- flake8 python3 python3-jinja2 python3-pytest
+ flake8 python3 python3-dacite python3-jinja2 python3-pytest
+
+ # Check Python modules under debian/lib and Python scripts under
+ # debian/bin or debian/rules.d.
+ - sources="$(mktemp)"
+ - find debian/lib/python -name '*.py' > "$sources"
+ - |
+ find debian/bin debian/rules.d -type f -perm /111 |
+ while read script; do
+ if awk '/^#!.*python/ { exit 0 } { exit 1 }' "$script"; then
+ echo "$script"
+ fi
+ done \
+ >> "$sources"
# Run both checkers and coalesce their results rather than exiting
# on first failure
- pass=true
- - flake8 debian --max-line-length=100 || pass=false
+ - xargs flake8 --max-line-length=100 < "$sources" || pass=false
- py.test debian/lib/python || pass=false
- $pass
needs: []
@@ -236,7 +250,7 @@ kconfig-static:
# Unpack source and apply featureset patches
- |
apt-get update && eatmydata apt-get install --no-install-recommends -y \
- debhelper dpkg-dev git python3 quilt
+ debhelper dpkg-dev git python3 python3-dacite quilt
- dpkg-source -x ${WORKING_DIR}/*.dsc ${WORKING_DIR}/${SOURCE_DIR}
- cd ${WORKING_DIR}/${SOURCE_DIR}
- debian/rules source