Skip to content

Commit b68e66d

Browse files
maven work flow updated
1 parent 1682353 commit b68e66d

File tree

1 file changed

+53
-12
lines changed

1 file changed

+53
-12
lines changed

.github/workflows/maven-build.yml

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,10 @@ on:
55
branches:
66
- master
77
jobs:
8-
build-and-test:
8+
build:
9+
name: Build All Modules (skip tests)
910
runs-on: ubuntu-latest
1011

11-
strategy:
12-
matrix:
13-
service: [product-service,
14-
order-service,
15-
inventory-service,
16-
api-gateway,
17-
config-server,
18-
eureka-server]
1912
steps:
2013
- name: Check out the repository
2114
uses: actions/checkout@v4
@@ -25,8 +18,56 @@ jobs:
2518
java-version: '17'
2619
distribution: 'temurin'
2720
cache: maven
21+
- name: Build all modules (skipping tests)
22+
run: mvn --batch-mode clean install -DskipTests
23+
outputs:
24+
build-status-key: ${{ steps.cache.outputs.cache-hit }}
25+
26+
test:
27+
name: Run Tests
28+
runs-on: ubuntu-latest
29+
needs: build
30+
steps:
31+
- name: Check out the repository
32+
uses: actions/checkout@v4
33+
- name: Set up JDK 17
34+
uses: actions/setup-java@v3
35+
with:
36+
java-version: '17'
37+
distribution: 'temurin'
38+
cache: maven
39+
- name: Run tests
40+
run: mvn --batch-mode test
41+
42+
2843

2944

30-
- name: Build and test ${matrix.service}
31-
working-directory: ./${{ matrix.service }}
32-
run: mvn --batch-mode package
45+
# pull_request:
46+
# branches:
47+
# - master
48+
#jobs:
49+
# build-and-test:
50+
# runs-on: ubuntu-latest
51+
#
52+
# strategy:
53+
# matrix:
54+
# service: [product-service,
55+
# order-service,
56+
# inventory-service,
57+
# api-gateway,
58+
# config-server,
59+
# eureka-server]
60+
# steps:
61+
# - name: Check out the repository
62+
# uses: actions/checkout@v4
63+
# - name: Set up JDK 17
64+
# uses: actions/setup-java@v3
65+
# with:
66+
# java-version: '17'
67+
# distribution: 'temurin'
68+
# cache: maven
69+
#
70+
#
71+
# - name: Build and test ${matrix.service}
72+
# working-directory: ./${{ matrix.service }}
73+
# run: mvn --batch-mode package

0 commit comments

Comments
 (0)