-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.55 KB
/
buildapps.yaml
File metadata and controls
55 lines (55 loc) · 1.55 KB
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
48
49
50
51
52
53
54
55
name: Github Action Build App Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Pipeline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Set up && Build with Maven
uses: stCarolas/setup-maven@v4.4
with:
maven-version: 3.6.3
- name: Build Apps
run: |
cd departement-service
mvn -f pom.xml --batch-mode --batch-mode --update-snapshots clean install -DskipTests
cd ..
cd users-service
mvn -f pom.xml --batch-mode --batch-mode --update-snapshots clean install -DskipTests
- name: Build Images
run: docker compose build
- name: Created Images
run: docker images
- name: Run Containers
run: docker compose up -d
- name: Sleep for 60 seconds
uses: jakejarvis/wait-action@master
with:
time: '60s'
# - name: Run JUnit Tests
# run: |
# cd departement-service
# mvn -f pom.xml --batch-mode --batch-mode --update-snapshots test
# cd ..
# cd users-service
# mvn -f pom.xml --batch-mode --batch-mode --update-snapshots test
- name: Running Containers
run: docker ps
- name: Stop Containers
if: always()
continue-on-error: true
run: docker compose down -v