Skip to content

Commit b6918a9

Browse files
ci changes
1 parent d5ebeda commit b6918a9

File tree

1 file changed

+32
-80
lines changed

1 file changed

+32
-80
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,36 @@
1-
name: CI Pipeline
1+
name: Simple CI
22

3-
# When to run this workflow
3+
# Only run on main branch pushes for a solo project
44
on:
5-
push:
6-
branches: [main, develop]
7-
pull_request:
8-
branches: [main]
5+
push:
6+
branches: [main]
97

108
jobs:
11-
# Test the backend
12-
test-backend:
13-
runs-on: ubuntu-latest
14-
15-
steps:
16-
# Step 1: Get the code from GitHub
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
20-
# Step 2: Install Node.js
21-
- name: Setup Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: "18"
25-
cache: "npm"
26-
cache-dependency-path: backend/package-lock.json
27-
28-
# Step 3: Install dependencies
29-
- name: Install backend dependencies
30-
run: |
31-
cd backend
32-
npm ci
33-
34-
# Step 4: Run tests (THIS IS THE IMPORTANT PART)
35-
- name: Run backend tests
36-
run: |
37-
cd backend
38-
npm test
39-
40-
# Build and test frontend
41-
test-frontend:
42-
runs-on: ubuntu-latest
43-
44-
steps:
45-
- name: Checkout code
46-
uses: actions/checkout@v4
47-
48-
- name: Setup Node.js
49-
uses: actions/setup-node@v4
50-
with:
51-
node-version: "18"
52-
cache: "npm"
53-
cache-dependency-path: frontend/package-lock.json
54-
55-
- name: Install frontend dependencies
56-
run: |
57-
cd frontend
58-
npm ci
59-
60-
# Check for code style issues
61-
- name: Lint frontend code
62-
run: |
63-
cd frontend
64-
npm run lint
65-
66-
# Make sure frontend builds without errors
67-
- name: Build frontend
68-
run: |
69-
cd frontend
70-
npm run build
71-
72-
# Optional: Test Docker builds (comment out if you don't want this yet)
73-
docker-build:
74-
runs-on: ubuntu-latest
75-
needs: [test-backend, test-frontend]
76-
77-
steps:
78-
- name: Checkout code
79-
uses: actions/checkout@v4
80-
81-
- name: Test Docker build
82-
run: |
83-
docker-compose build
84-
echo "Docker images built successfully"
9+
# Quick check that everything still works
10+
quick-check:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "18"
21+
22+
# Build and test backend
23+
- name: Build and test backend
24+
run: |
25+
cd backend
26+
npm install
27+
npm test
28+
echo "Backend tests passed ✓"
29+
30+
# Build frontend
31+
- name: Build frontend
32+
run: |
33+
cd frontend
34+
npm install
35+
npm run build
36+
echo "Frontend built successfully ✓"

0 commit comments

Comments
 (0)