File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,12 +20,16 @@ jobs:
2020 pip install pylint
2121 - name : Analysing the code with pylint
2222 run : |
23- pylint $(git ls-files '*.py')
24- - name : Extract score
23+ pylint $(git ls-files '*.py') > pylint_report.txt || true
24+ - name : Extract pylint score
2525 id : extract_score
2626 run : |
27- score=$(grep "rated at" pylint-output.txt | sed -E 's/.*rated at ([0-9]+\.[0-9]+)\/10.*/\1/')
28- echo "score=$score" >> $GITHUB_OUTPUT
29- - name : Set badge label (optional)
30- run : |
31- echo "::set-output name=badge_url::https://img.shields.io/badge/pylint-${{ steps.extract_score.outputs.score }}%2F10-brightgreen"
27+ SCORE=$(grep -oP '(?<=Your code has been rated at )[-0-9\.]+' pylint_report.txt)
28+ echo "score=$SCORE" >> $GITHUB_OUTPUT
29+ echo "Pylint score: $SCORE"
30+
31+ - name : Upload pylint report
32+ uses : actions/upload-artifact@v4
33+ with :
34+ name : pylint-report
35+ path : pylint_report.txt
You can’t perform that action at this time.
0 commit comments