Backdated commit: October 6th, 2023 #91
This file contains hidden or 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: | |
| - main | |
| - develop | |
| - staging | |
| jobs: | |
| pylint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pylint | |
| - name: Run pylint | |
| run: | | |
| pylint **/*.py | tee pylint_output.txt | |
| SCORE=$(grep "Your code has been rated at" pylint_output.txt | tail -n 1 | awk '{print $7}') | |
| echo "Pylint score: $SCORE" | |
| if [ "$SCORE" != "10.00/10" ]; then | |
| cat pylint_output.txt | |
| exit 1 | |
| fi |