Skip to content

Commit 8b56413

Browse files
authored
Update ci-pipeline.yml
1 parent 45f2fc0 commit 8b56413

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,48 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
test-django:
10+
test:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14+
# Step 1: Check out the repository
1415
- name: Check out the repository
1516
uses: actions/checkout@v4
1617

18+
# Step 2: Set up Python for Django and pytest tests
1719
- name: Set up Python
1820
uses: actions/setup-python@v4
1921
with:
2022
python-version: '3.9'
2123

22-
- name: Install dependencies
24+
# Step 3: Install Python dependencies
25+
- name: Install Python dependencies
2326
run: |
2427
python -m pip install --upgrade pip
2528
pip install -r time_complexity_analyzer/requirements.txt
2629
27-
- name: Run migrations
28-
run: python time_complexity_analyzer/manage.py migrate
30+
# Step 4: Run pytest for `analyzer` folder tests
31+
- name: Run pytest for analyzer tests
32+
run: pytest time_complexity_analyzer/analyzer
2933

30-
- name: Run tests
31-
run: python time_complexity_analyzer/manage.py test
34+
# Step 5: Run Django migrations and tests
35+
- name: Run Django tests
36+
run: |
37+
python time_complexity_analyzer/manage.py migrate
38+
python time_complexity_analyzer/manage.py test
39+
40+
# Step 6: Set up Node.js for React frontend tests
41+
- name: Set up Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '16'
45+
46+
# Step 7: Install frontend dependencies
47+
- name: Install frontend dependencies
48+
working-directory: frontend
49+
run: npm install
50+
51+
# Step 8: Run React frontend tests
52+
- name: Run React frontend tests
53+
working-directory: frontend
54+
run: npm test -- --watchAll=false

0 commit comments

Comments
 (0)