Skip to content

update readme.rst

update readme.rst #16

Workflow file for this run

name: Pylint
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
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 pylint autopep8
- name: Initial Pylint Check
id: pylint-check
run: |
pylint countdown_timer || true
- name: Check Pylint Score
id: score-check
run: |
score=$(pylint countdown_timer | tee /dev/tty | grep 'Your code has been rated at' | awk '{print $7}' | cut -d/ -f1)
echo "::set-output name=score::$score"
- name: Conditional Autopep8 Fix and Recheck
if: steps.score-check.outputs.score < 3.5
run: |
echo "Pylint score (${{ steps.score-check.outputs.score }}) is less than 3.5. Running autopep8..."
autopep8 --in-place --aggressive --aggressive countdown_timer/**/*.py
pylint countdown_timer
- name: Final Pylint Check
if: steps.score-check.outputs.score < 3.5
run: |
pylint countdown_timer --fail-under=3.5