Skip to content

Commit 47416c5

Browse files
committed
refactor CI workflow
1 parent e804089 commit 47416c5

1 file changed

Lines changed: 43 additions & 23 deletions

File tree

.github/workflows/maven.yml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Maven Build
22
env:
33
MAVEN_OPTS: -Djava.awt.headless=true
4-
MAVEN_VERSION: '3.9.16'
54
JAVA_VERSION: '17'
65

76
on:
@@ -12,25 +11,46 @@ on:
1211
workflow_dispatch:
1312

1413
jobs:
15-
build:
16-
name: Build
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v7
20-
- name: 'Set up JDK'
21-
uses: actions/setup-java@v5
22-
with:
23-
java-version: ${{ env.JAVA_VERSION }}
24-
distribution: 'temurin'
25-
cache: 'maven'
26-
- name: 'Set up Maven'
27-
uses: stCarolas/setup-maven@v5.1
28-
with:
29-
maven-version: ${{ env.MAVEN_VERSION }}
30-
- name: 'Build with Maven'
31-
run: mvn clean install -DskipTests
32-
- name: 'Run WFSGetFeatureUtilTest with Maven'
33-
continue-on-error: true
34-
run: mvn test -Dtest=WFSGetFeatureUtilTest
35-
- name: 'Run WFSGetFeatureControllerTest (Spring Boot) with Maven'
36-
run: mvn test -Dtest=WFSGetFeatureControllerTest
14+
build:
15+
name: Build
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v7
19+
- name: 'Set up JDK'
20+
uses: actions/setup-java@v5
21+
with:
22+
java-version: ${{ env.JAVA_VERSION }}
23+
distribution: 'temurin'
24+
cache: 'maven'
25+
- name: 'Build with Maven'
26+
run: mvn install -DskipTests=true
27+
28+
test_one:
29+
name: 'Run JUnit test with Maven'
30+
needs: build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v7
34+
- name: 'Set up JDK'
35+
uses: actions/setup-java@v5
36+
with:
37+
java-version: ${{ env.JAVA_VERSION }}
38+
distribution: 'temurin'
39+
cache: 'maven'
40+
- name: 'Run WFSGetFeatureUtilTest'
41+
run: mvn test -Dtest=WFSGetFeatureUtilTest
42+
43+
test_two:
44+
steps:
45+
- uses: actions/checkout@v7
46+
- name: 'Set up JDK'
47+
uses: actions/setup-java@v5
48+
with:
49+
java-version: ${{ env.JAVA_VERSION }}
50+
distribution: 'temurin'
51+
cache: 'maven'
52+
name: 'Run Spring Boot test with Maven'
53+
needs: build
54+
runs-on: ubuntu-latest
55+
- name: 'Run WFSGetFeatureControllerTest'
56+
run: mvn test -Dtest=WFSGetFeatureControllerTest

0 commit comments

Comments
 (0)