-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (35 loc) · 1.02 KB
/
backend_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: backend-worklow
on:
push:
paths:
- 'backend/**'
- docker-compose.yml
- docker-compose.dev.yml
- '.github/workflows/backend_build.yml'
pull_request:
branches:
- main
- staging
- develop
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory:
backend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Maven
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Build Docker backend-prod Image
run: docker compose -f docker-compose.yml build db
- name: Run Docker backend-prod Container
run: docker compose -f docker-compose.yml up -d db
- name: Run Tests
run: mvn clean test
- name: Stop Docker backend-prod Container
run: docker compose -f docker-compose.yml down