-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1.29 KB
/
pylint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: PyLint
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11" ]
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 -r requirements.txt
- name: Code Review Scoring
run: find . -name '*.py' -print -exec pylint {} \;
- name: Analysing code with PyLint
run: |
# pylint $(find . -name '*.py') --fail-under=8.0
pylint_score=$(pylint $(find . -name '*.py') --fail-under=8.0 --exit-zero --output-format=text | tee /dev/tty | grep 'Your code has been rated at' | sed 's/.*rated at \([-0-9.]*\)\/.*/\1/')
echo "Pylint score: $pylint_score"
# Assuming you have a script or service to generate/update the badge
badge_url="https://some-badge-service.com/badge?score=$pylint_score"
echo "Badge URL: $badge_url"
# Update README.md or another document with the new badge URL
# This is a simplified example. You would need a script to properly update the README.md with the new badge URL.