fix: pylint score #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |