Update ci-unit-test.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |