From 6f2bab8225dd715d27ce928bb8994fd2960f7621 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 29 Aug 2023 09:55:08 +0200 Subject: [PATCH] Add linting and static analysis CI --- .woodpecker/lint.yml | 16 ++++++++++++++++ .woodpecker/static_analysis.yml | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 .woodpecker/lint.yml create mode 100644 .woodpecker/static_analysis.yml diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..4400de4 --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,16 @@ +steps: + lint_ruff: + image: python + commands: + - pip install ruff + - python --version && poetry --version && ruff --version + - echo "----------------- running ruff lint ------------------" + - ruff check . + + lint_black: + image: python + commands: + - pip install black + - python --version && poetry --version && black --version + - echo "----------------- running black lint ----------------" + - black --check . diff --git a/.woodpecker/static_analysis.yml b/.woodpecker/static_analysis.yml new file mode 100644 index 0000000..2612048 --- /dev/null +++ b/.woodpecker/static_analysis.yml @@ -0,0 +1,8 @@ +steps: + pyright: + image: ghcr.io/withlogicco/poetry:1.5.1 + commands: + - pip install pyright + - python --version && poetry --version && pyright --version + - echo "------------- running pyright typecheck -------------" + - poetry run pyright