Skip to content

fix: implement PV forecast fallback caching on API failures #364

fix: implement PV forecast fallback caching on API failures

fix: implement PV forecast fallback caching on API failures #364

Workflow file for this run

name: Pylint
on:
push:
pull_request:
branches: ["develop"]
jobs:
pylint_check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint astroid pytest
pip install -r requirements.txt
sudo apt-get update && sudo apt-get install -y bc # Install bc
- name: Analysing the code with pylint
run: |
pylint_output=$(pylint $(git ls-files '*.py') --output-format=parseable | tee pylint.log)
echo "$pylint_output"
SCORE=$(echo "$pylint_output" | awk -F ' ' '/Your code has been rated at/ {print $7}' | cut -d'/' -f1)
if (( $(echo "$SCORE >= 9.0" | bc -l) )); then
echo "Pylint score ($SCORE) is acceptable."
exit 0
else
echo "Pylint score ($SCORE) is too low."
exit 1
fi