forked from Kashika08/application-tracking-system
-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (27 loc) · 905 Bytes
/
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
33
name: Pylint
on:
push:
branches: [project2]
pull_request:
branches: [project2]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.13
uses: actions/setup-python@v3
with:
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analyzing the code with pylint
run: |
pylint $(git ls-files '*.py') > pylint_output.txt || true
score=$(grep "Your code has been rated at" pylint_output.txt | sed -E 's/^.*rated at ([0-9.]+).*$/\1/') # Get the Pylint score
echo "::set-output name=score::$score" # Set the score as output
- name: Save Pylint score to file
run: |
echo "Pylint Score: ${{ steps.pylint.outputs.score }}" > pylint_score.txt