2021-09-29 22:08:51 +02:00
---
2021-10-01 12:09:20 +02:00
# vi: ts=2 sw=2 et:
2021-10-01 12:10:22 +02:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2021-09-29 22:08:51 +02:00
# https://github.com/marketplace/actions/super-linter
name : Lint Code Base
on :
pull_request :
branches :
- main
2021-11-12 17:37:15 +01:00
- v[0-9]+-stable
2021-09-29 22:08:51 +02:00
2021-11-13 22:34:04 +00:00
permissions :
contents : read
2021-11-13 14:40:20 +00:00
2021-09-29 22:08:51 +02:00
jobs :
build :
name : Lint Code Base
2024-06-07 10:55:53 +02:00
runs-on : ubuntu-24.04
2021-11-10 16:45:12 +01:00
concurrency :
group : ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress : true
2021-09-29 22:08:51 +02:00
steps :
- name : Repo checkout
2024-11-01 09:01:41 +00:00
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2021-09-29 22:08:51 +02:00
with :
# We need a full repo clone
fetch-depth : 0
- name : Lint Code Base
2024-09-01 09:10:23 +00:00
uses : super-linter/super-linter/slim@b92721f792f381cedc002ecdbb9847a15ece5bb8
2021-09-29 22:08:51 +02:00
env :
DEFAULT_BRANCH : main
2024-05-02 09:45:02 +02:00
MULTI_STATUS : false
2021-09-29 22:08:51 +02:00
VALIDATE_ALL_CODEBASE : false
2022-05-24 21:01:45 +02:00
VALIDATE_GITHUB_ACTIONS : true
2024-10-05 12:20:57 +02:00
- name : Check that tabs are not used in Python code
2024-11-23 12:54:02 +01:00
run : sh -c '! git grep -P "\\t" -- src/ukify/ukify.py test/integration-test-wrapper.py'
2024-10-05 12:20:57 +02:00
- 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
2024-11-23 12:54:02 +01:00
python3 -m mypy src/ukify/ukify.py test/integration-test-wrapper.py
2024-10-05 12:20:57 +02:00
- name : Run ruff check
run : |
ruff --version
2024-11-23 12:54:02 +01:00
ruff check src/ukify/ukify.py test/integration-test-wrapper.py
2024-10-05 12:20:57 +02:00
- name : Run ruff format
run : |
ruff --version
2024-11-23 12:54:02 +01:00
ruff format --check src/ukify/ukify.py test/integration-test-wrapper.py