Skip to content

Merge pull request #29 from CSC-510-G55/tests #38

Merge pull request #29 from CSC-510-G55/tests

Merge pull request #29 from CSC-510-G55/tests #38

Workflow file for this run

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/')
echo "score=$score" >> $GITHUB_OUTPUT
echo "::notice::Pylint score: $score/10"
- name: Save Pylint score to file
run: |
echo "Pylint Score: ${{ steps.pylint.outputs.score }}" > pylint_score.txt