Skip to content

Commit

Permalink
Add pylint in dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
floflo0 committed Nov 18, 2024
1 parent 0a48215 commit 654dcc3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[MAIN]
ignore-paths=.*/migrations
ignore-paths=.*/migrations

disable=
too-many-arguments,
Expand All @@ -12,3 +12,6 @@ disable=
too-many-lines,
cyclic-import,
protected-access

load-plugins=pylint_django
django-settings-module=insalan.settings
4 changes: 3 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
ENTRYPOINT ["./entrypoint-dev.sh"]
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pylint==3.0.3
pylint-django==2.6.1

0 comments on commit 654dcc3

Please sign in to comment.