mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-02-13 21:43:30 +00:00
Add CI lint checks for Python code
Add a lint job to the Launchpad CI pipeline that runs mypy, black, and flake8 on the new Python code (gen-iso-ids, isobuild, isobuilder).
This commit is contained in:
parent
b3fdc4e615
commit
ce809612c4
12
.launchpad.yaml
Normal file
12
.launchpad.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
pipeline:
|
||||||
|
- [lint]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
series: noble
|
||||||
|
architectures: amd64
|
||||||
|
packages:
|
||||||
|
- black
|
||||||
|
- mypy
|
||||||
|
- python3-flake8
|
||||||
|
run: ./check-lint
|
||||||
11
check-lint
Executable file
11
check-lint
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
export MYPYPATH=live-build
|
||||||
|
mypy live-build/isobuilder live-build/isobuild
|
||||||
|
mypy live-build/gen-iso-ids
|
||||||
|
|
||||||
|
black --check live-build/isobuilder live-build/isobuild live-build/gen-iso-ids
|
||||||
|
|
||||||
|
python3 -m flake8 --max-line-length 88 --ignore E203 live-build/isobuilder live-build/isobuild live-build/gen-iso-ids
|
||||||
Loading…
x
Reference in New Issue
Block a user