Skip to content

Commit dbe2963

Browse files
Merge pull request #154 from UNLV-CS472-672/ci-pipelin-improvements
proper fix to ci pipeline
2 parents 59459d2 + 46277ab commit dbe2963

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

.github/workflows/django_ci_cd.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Django CI/CD
2-
2+
# Triggers when making a pull request to main and commits to main
33
on:
44
push:
55
branches:
@@ -31,12 +31,6 @@ jobs:
3131
sudo service redis-server start
3232
sudo service redis-server status
3333
34-
- name: Install Flake8 and Run Linter
35-
run: |
36-
pip install flake8
37-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
38-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
39-
4034
- name: Install Dependencies
4135
run: |
4236
python -m pip install --upgrade pip
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Django Linter
2+
# Triggers when making a pull request to main and commits to main
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: backend # Set the default working directory
17+
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.10.12
26+
27+
- name: Install Flake8 and Run Linter
28+
run: |
29+
pip install flake8
30+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
31+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics

backend/.coveragerc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[run]
2+
source =
3+
apps/users
4+
apps/lessons
5+
apps/submissions
6+
apps/uploads
7+
apps/chat
8+
apps/notifications
9+
apps/pomodoro
10+
apps/bookings
11+
apps/planner
12+
apps/search
13+
14+
omit =
15+
*/tests/*
16+
*/migrations/*
17+
*/__init__.py
18+
*/settings.py
19+
*/wsgi.py
20+
*/asgi.py
21+
*/manage.py
22+
23+
[report]
24+
show_missing = True
25+
skip_covered = True

0 commit comments

Comments
 (0)