From c1359b7ce8a1945e41e90330fe39bc634d9ca6f3 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Mon, 11 Mar 2024 13:36:04 +0530 Subject: [PATCH] Added pylint (#1302) * Create bandit_security_test.yml Added Bandit security test for python * Update bandit_security_test.yml * Update bandit_security_test.yml * Create pylint.yml * Update pylint.yml * Update pylint.yml --- .github/workflows/bandit_security_test.yml | 27 ++++++++++++++++++++++ .github/workflows/pylint.yml | 24 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/bandit_security_test.yml create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml new file mode 100644 index 000000000..6c77c2cbc --- /dev/null +++ b/.github/workflows/bandit_security_test.yml @@ -0,0 +1,27 @@ +name: Security check - Bandit + +on: push + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + name: Python ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Security check - Bandit + uses: ioggstream/bandit-report-artifacts@v0.0.2 + with: + project_path: . + ignore_failure: true + + # This is optional + - name: Security check report artifacts + uses: actions/upload-artifact@v1 + with: + name: Security report + path: output/security_report.txt diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 000000000..2e572c297 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,24 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-22.04 + strategy: + matrix: + python-version: ["3.8"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py')