From c765579f23a166eab5140d56b34f15e8469d609a Mon Sep 17 00:00:00 2001 From: Prince D Rusweka Rwabongoya Date: Sun, 27 Apr 2025 23:05:09 -0400 Subject: [PATCH] Update backend-ci.yml --- .github/workflows/backend-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 226fda9..ec974e4 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -39,15 +39,16 @@ jobs: - name: Install backend dependencies run: | + sudo apt-get update + sudo apt-get install -y jq python -m pip install --upgrade pip pip install -r requirements.txt pip install pylint pytest requests - name: Run pylint on backend run: | - pylint_output=$(pylint $(git ls-files '*.py')) - echo "$pylint_output" - pylint_score=$(echo "$pylint_output" | tail -1 | grep -oE '[0-9]+\.[0-9]+') + pylint --exit-zero --output-format=json $(git ls-files '*.py') > pylint_report.json + pylint_score=$(jq '[.[].score] | add / length' pylint_report.json) echo "Pylint score: $pylint_score" if (( $(echo "$pylint_score < 8.0" | bc -l) )); then echo "Pylint score too low ($pylint_score)!" && exit 1