Skip to content

Commit

Permalink
ci: format and lint with autopep8 and pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
D4T4-L34K committed Oct 3, 2023
1 parent 3b361e9 commit 650bf89
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python application CI

on:
push:
branches: [ "main", "dev" ]
branches: [ "main", "dev", "fix/ci-python" ]
pull_request:
branches: [ "main", "dev" ]

Expand All @@ -23,12 +23,20 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install flake8 pylint autopep8
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
- name: Format with autopep8
run: |
autopep8 --in-place --recursive --max-line-length 120 --exclude="venv" .
- name: Lint with flake8
- name: Lint with pylint
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pylint **/*.py
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3 changes: 3 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ services:
- MONGO_URI
ports:
- '${PORT}:8000'
networks:
- networks-frontend
- networks-backend
restart: always

networks:
Expand Down

0 comments on commit 650bf89

Please sign in to comment.