diff --git a/.github/workflows/django_ci_cd.yml b/.github/workflows/django_ci_cd.yml index 4281e6ca..2c4335b8 100644 --- a/.github/workflows/django_ci_cd.yml +++ b/.github/workflows/django_ci_cd.yml @@ -1,5 +1,5 @@ name: Django CI/CD - +# Triggers when making a pull request to main and commits to main on: push: branches: @@ -31,12 +31,6 @@ jobs: sudo service redis-server start sudo service redis-server status - - name: Install Flake8 and Run Linter - run: | - pip install flake8 - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics - - name: Install Dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/django_linter.yml b/.github/workflows/django_linter.yml new file mode 100644 index 00000000..6b62dcb4 --- /dev/null +++ b/.github/workflows/django_linter.yml @@ -0,0 +1,31 @@ +name: Django Linter +# Triggers when making a pull request to main and commits to main +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: backend # Set the default working directory + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.10.12 + + - name: Install Flake8 and Run Linter + run: | + pip install flake8 + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics diff --git a/backend/.coveragerc b/backend/.coveragerc new file mode 100644 index 00000000..6d1427b1 --- /dev/null +++ b/backend/.coveragerc @@ -0,0 +1,25 @@ +[run] +source = + apps/users + apps/lessons + apps/submissions + apps/uploads + apps/chat + apps/notifications + apps/pomodoro + apps/bookings + apps/planner + apps/search + +omit = + */tests/* + */migrations/* + */__init__.py + */settings.py + */wsgi.py + */asgi.py + */manage.py + +[report] +show_missing = True +skip_covered = True \ No newline at end of file