Skip to content

Commit

Permalink
Update backend-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pdr21001 authored Apr 28, 2025
1 parent 70be04a commit c765579
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c765579

Please sign in to comment.