Skip to content

Commit

Permalink
pylint loads 80%
Browse files Browse the repository at this point in the history
  • Loading branch information
ssolson committed Feb 20, 2024
1 parent 05d3d66 commit dd6dfef
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pylint Loads

on: [push, pull_request]

jobs:
formatting-and-linting:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint

- name: Run Pylint on mhkit/loads/ and check score
run: |
# Run pylint and capture the output
pylint_output=$(pylint mhkit/loads/ --output-format=text)
echo "$pylint_output"
# Extract the score from the output
score=$(echo "$pylint_output" | grep "Your code has been rated at" | awk '{print $7}' | sed 's/\/10//')
echo "Pylint score: $score"
# Define the minimum acceptable score
min_score=8.0
# Compare the score with the minimum acceptable score
python -c "import sys; sys.exit(0 if $score >= $min_score else 1)"

0 comments on commit dd6dfef

Please sign in to comment.