Skip to content

Commit ebadd6e

Browse files
authored
Create ci-cd.yml
1 parent 4876d7c commit ebadd6e

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Nafath Mock CI/CD
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
backend-ci:
11+
runs-on: ubuntu-latest
12+
services:
13+
mssql:
14+
image: mcr.microsoft.com/mssql/server:2022-latest
15+
env:
16+
ACCEPT_EULA: 'Y'
17+
MSSQL_SA_PASSWORD: 'Password123'
18+
ports:
19+
- 1433:1433
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up JDK 21
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: '21'
28+
distribution: 'temurin'
29+
cache: 'maven'
30+
31+
- name: Build with Maven
32+
run: |
33+
cd backend
34+
./mvnw clean package -DskipTests=false
35+
# Note: Set skipTests to true if you haven't written JUnit tests yet
36+
37+
frontend-ci:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Setup Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: '20'
46+
cache: 'npm'
47+
cache-dependency-path: './frontend/package-lock.json'
48+
49+
- name: Install dependencies
50+
run: |
51+
cd frontend
52+
npm ci
53+
54+
- name: Next.js Build
55+
run: |
56+
cd frontend
57+
npm run build

0 commit comments

Comments
 (0)