diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 4718a6ce5..a1b24e536 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -10,15 +10,15 @@ on: branches: [ main ] jobs: - build: - + build_and_test: + name: Build and Test runs-on: ubuntu-latest strategy: matrix: java: [ '17' ] - steps: - - uses: actions/checkout@v4 + - name: checkout Git repository + uses: actions/checkout@v4 - name: Set up JDK ${{matrix.java}} uses: actions/setup-java@v4 with: @@ -27,3 +27,11 @@ jobs: cache: maven - name: Build with Maven Wrapper run: ./mvnw -B package + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: TEST with Maven Wrapper + run: ./mvnw -B test diff --git a/.github/workflows/maven-test.yml b/.github/workflows/maven-test.yml deleted file mode 100644 index 907a10875..000000000 --- a/.github/workflows/maven-test.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Java TESTS with Maven - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{matrix.java}} - uses: actions/setup-java@v4 - with: - java-version: ${{matrix.java}} - distribution: 'adopt' - cache: maven - - name: TEST with Maven Wrapper - run: ./mvnw -B test diff --git a/.github/workflows/run-jmeter-test.yml b/.github/workflows/run-jmeter-test.yml index 6f222cea9..8c3fcebd6 100644 --- a/.github/workflows/run-jmeter-test.yml +++ b/.github/workflows/run-jmeter-test.yml @@ -15,8 +15,6 @@ jobs: java-version: ${{matrix.java}} distribution: 'adopt' cache: maven - - name: Build with Maven Wrapper - run: ./mvnw spring-boot:run - name: Run JMeter Action on a test uses: rbhadti94/apache-jmeter-action@v0.5.0 with: