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.yml15
1 files changed, 14 insertions, 1 deletions
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
index 58efe6a395..0562e1d59f 100644
--- a/debian/salsa-ci.yml
+++ b/debian/salsa-ci.yml
@@ -216,10 +216,23 @@ python-static:
apt-get update && eatmydata apt-get install --no-install-recommends -y \
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: []