@@ -13,41 +13,30 @@ jobs:
1313 runs-on : ubuntu-latest
1414 steps :
1515 - uses : actions/checkout@v3
16- - name : Set up JDK
17- uses : actions/setup-java@v3
18- with :
19- java-version : ' 17'
20- distribution : ' temurin'
21- - name : Build Spring Boot
22- working-directory : ./backend
23- run : mvn clean package
24- - name : Run backend unit tests
25- working-directory : ./backend
26- run : mvn test
2716 - name : Docker build backend
28- run : docker build -t my-backend ./backend
29-
17+ run : docker build -t clahe-backend ./backend
3018
3119 build-frontend :
3220 runs-on : ubuntu-latest
3321 needs : build-backend
3422 steps :
35- - uses : actions/checkout@v3
36- - name : Node.js setup
37- uses : actions/setup-node@v3
38- with :
39- node-version : ' 20'
40- - name : Install dependencies and build
41- working-directory : ./frontend
23+ - name : Checkout repository
24+ uses : actions/checkout@v3
25+ # Optional: log in to a container registry if you want to push images
26+ # - name: Log in to Docker Hub
27+ # uses: docker/login-action@v3
28+ # with:
29+ # username: ${{ secrets.DOCKER_USERNAME }}
30+ # password: ${{ secrets.DOCKER_PASSWORD }}
31+ - name : Build frontend Docker image
32+ run : docker build -t clahe-frontend ./frontend
33+ # test the build
34+ - name : Run container smoke test
4235 run : |
43- npm install
44- npm run build
45- - name : Run frontend unit tests
46- working-directory : ./frontend
47- run : npm test -- --watchAll=false
48- - name : Docker build frontend
49- run : docker build -t my-frontend ./frontend
50-
36+ docker run --rm -p 8080:80 clahe-frontend curl -I http://localhost:8080
37+ # Optional: push to registry for later deployment
38+ # - name: Push image to Docker Hub
39+ # run: docker push clahe-frontend
5140
5241 approve-release :
5342 needs : [build-backend, build-frontend]
5847 approvers : " "
5948 minimum-approvals : 1
6049
61-
6250 release :
6351 if : startsWith(github.ref, 'refs/tags/')
6452 runs-on : ubuntu-latest
7159 name : " Release ${{ github.ref_name }}"
7260 body : " Automated release from CI/CD workflow."
7361
74-
7562 infra-plan :
7663 if : startsWith(github.ref, 'refs/tags/')
7764 runs-on : ubuntu-latest
0 commit comments