diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 586d3549..af14de98 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: # Install Python 3.12 - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.12' # Set the environment up - run: python3 -m venv env @@ -32,13 +32,13 @@ jobs: - name: Install dependencies run: pip3 install -r requirements.txt - name: Install pylint and pylint-django - run: pip3 install pylint==3.0.3 pylint-django + run: pip3 install -r requirements-dev.txt # Run lints - name: Run linter evaluation shell: bash run: | - pylint --fail-under ${{ env.PYLINT_MINSCORE }} --load-plugins pylint_django --django-settings-module insalan.settings ./insalan | tee >(grep "Your code has been" | sed 's/^Your code has been rated at \(.*\)\/10.*/PYLINT_SCORE=\1/' >> "$GITHUB_ENV") + pylint --fail-under ${{ env.PYLINT_MINSCORE }} ./insalan | tee >(grep "Your code has been" | sed 's/^Your code has been rated at \(.*\)\/10.*/PYLINT_SCORE=\1/' >> "$GITHUB_ENV") # Summary - name: Summary @@ -71,7 +71,7 @@ jobs: # Install Python 3.12 - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.12' # Set the environment up - run: python3 -m venv env diff --git a/.pylintrc b/.pylintrc index 1ce438bf..984c50b4 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,5 +1,5 @@ [MAIN] -ignore-paths=.*/migrations +ignore-paths=.*/migrations disable= too-many-arguments, @@ -12,3 +12,6 @@ disable= too-many-lines, cyclic-import, protected-access + +load-plugins=pylint_django +django-settings-module=insalan.settings diff --git a/Dockerfile.dev b/Dockerfile.dev index c5a14a80..97f2056e 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -6,7 +6,9 @@ WORKDIR /app RUN apk add --no-cache postgresql15-dev gcc musl-dev COPY requirements.txt /app/ +COPY requirements-dev.txt /app/ RUN pip install -r /app/requirements.txt +RUN pip install -r /app/requirements-dev.txt -ENTRYPOINT ["./entrypoint-dev.sh"] \ No newline at end of file +ENTRYPOINT ["./entrypoint-dev.sh"] diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..c17bc41b --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,2 @@ +pylint==3.0.3 +pylint-django==2.6.1