File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments