From: Jörg Behrmann Date: Sat, 5 Oct 2024 10:20:57 +0000 (+0200) Subject: ci: Check ukify types and formatting. X-Git-Tag: v257-rc1~279^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5085be9c5fd4ecc3955ecec124860b2d1a87ad8;p=thirdparty%2Fsystemd.git ci: Check ukify types and formatting. --- diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 6cb07c95f98..53d1b1b9596 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -35,3 +35,26 @@ jobs: MULTI_STATUS: false VALIDATE_ALL_CODEBASE: false VALIDATE_GITHUB_ACTIONS: true + + - name: Check that tabs are not used in Python code + run: sh -c '! git grep -P "\\t" -- src/ukify/ukify.py' + + - name: Install ruff and mypy + run: | + python3 -m pip install --break-system-packages --upgrade setuptools wheel pip + python3 -m pip install --break-system-packages mypy types-Pillow ruff + + - name: Run mypy + run: | + python3 -m mypy --version + python3 -m mypy src/ukify/ukify.py + + - name: Run ruff check + run: | + ruff --version + ruff check src/ukify/ukify.py + + - name: Run ruff format + run: | + ruff --version + ruff format --check src/ukify/ukify.py