From 2c80006400ccefa7013800f28ac70af92785ae61 Mon Sep 17 00:00:00 2001 From: Alexandre CHAZAL Date: Mon, 6 Dec 2021 19:55:50 +0100 Subject: [PATCH] feat(drone): added linting and analysis in the CI --- .drone.yml | 22 +++++++++++++++++++++- requirements.txt | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 979ad14..a3a5f38 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,7 +8,27 @@ platform: arch: amd64 steps: - - name: docker + - name: Install packages + image: python + commands: + - pip install -r requirements.txt + + - name: Lint - pylint + image: python + commands: + - pylint wsgi.py app/*.py + + - name: Lint - flake8 + image: python + commands: + - flake8 wsgi.py app/*.py + + - name: Security analysis with bandit + image: python + commands: + - bandit -r app/ + + - name: Publish the image image: plugins/docker settings: repo: registry.alxczl.fr/ldap-interface diff --git a/requirements.txt b/requirements.txt index 8f5ecee..602c8b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,5 @@ ldap3 Flask-WTF==1.0.0 email-validator flake8 +pylint bandit \ No newline at end of file