Update additional_setup.md #81
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: | |
- main | |
- develop | |
- staging | |
pull_request: | |
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 opencv-python flask | |
- name: Run pylint | |
run: | | |
pylint --disable=import-error,duplicate-code,F0001 **/*.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 |