-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.41 KB
/
ci-unit-test.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
48
49
50
51
52
53
54
55
56
57
name: CI Unit test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
# Job 1: Running test case on testing project
run-unit-test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
# Navigate to the SpringBoot project directory
- name: Change directory to testing project
run: cd testing/jUnit/01-SumTest
# Run tests in the nested Spring Boot project
- name: Run All Unit Tests
run: mvn -B clean test --file testing/jUnit/01-SumTest/pom.xml
env:
SPRING_PROFILES_ACTIVE: test
# Job 2: Running test case on web_frameworks/SpringBoot
run-unit-test-sp:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
# Navigate to the SpringBoot project directory
- name: Change directory to SpringBoot project
run: cd web_frameworks/SpringBoot
# Run tests in the nested Spring Boot project
- name: Run All Unit Tests
run: mvn -B clean test --file web_frameworks/SpringBoot/pom.xml
env:
SPRING_PROFILES_ACTIVE: test