File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ backend-tests :
13
+ name : Backend - Build and Test
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v3
19
+
20
+ - name : Set up JDK
21
+ uses : actions/setup-java@v3
22
+ with :
23
+ java-version : ' 23' # Update if using a different Java version
24
+ distribution : ' openjdk'
25
+
26
+ - name : Cache Maven dependencies
27
+ uses : actions/cache@v3
28
+ with :
29
+ path : ~/.m2
30
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31
+ restore-keys : |
32
+ ${{ runner.os }}-maven-
33
+
34
+ - name : Build and test backend
35
+ run : |
36
+ cd backend
37
+ ./mvnw clean install
38
+
39
+ frontend-tests :
40
+ name : Frontend - Build and Test
41
+ runs-on : ubuntu-latest
42
+
43
+ steps :
44
+ - name : Checkout code
45
+ uses : actions/checkout@v3
46
+
47
+ - name : Set up Node.js
48
+ uses : actions/setup-node@v3
49
+ with :
50
+ node-version : ' 22'
51
+
52
+ - name : Cache npm dependencies
53
+ uses : actions/cache@v3
54
+ with :
55
+ path : ~/.npm
56
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
57
+ restore-keys : |
58
+ ${{ runner.os }}-node-
59
+
60
+ - name : Install dependencies
61
+ run : |
62
+ cd frontend
63
+ npm ci
64
+
65
+ - name : Run tests
66
+ run : |
67
+ npm run test -- --watch=false --no-progress
68
+
69
+ - name : Build frontend
70
+ run : |
71
+ npm run build -- --configuration production
You can’t perform that action at this time.
0 commit comments