Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Built the docker and succeed #32

Built the docker and succeed

Built the docker and succeed #32

Workflow file for this run

name: Pylint Code Analysis
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
pylint-check:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Pylint
run: pip install pylint==3.3.5
- name: Run Pylint analysis
id: pylint
run: |
# Run Pylint using project's .pylintrc and save output
pylint_output=$(pylint --exit-zero --rcfile=.pylintrc mymodels/*)
echo "Pylint output:"
echo "$pylint_output"
# Extract score and judge
score=$(echo "$pylint_output" | grep -oP 'Your code has been rated at \K\d+\.?\d*')
if (( $(echo "$score < 8.5" | bc -l) )); then
echo "::error::Pylint score ${score}/10 is below the requirement (minimum 8.5 points)"
exit 1
else
echo "Pylint score ${score}/10 meets the requirement"
fi