From 9431d1dfd47825c5020184f58f1e1581c59661c8 Mon Sep 17 00:00:00 2001 From: Dive <112424522+JeffTabiri@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:48:55 +0100 Subject: [PATCH] chore: add test job --- .github/workflows/maven.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1b0842c..0f2f560 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -7,20 +7,15 @@ on: #branches: [ "develop" ] jobs: - - #Job for building the application". build: - #The type of container the application will run in. runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed asa part of the job steps: - name: Step 1 - Checkout the main branches from Github - - uses: actions/checkout@v3 - - # Configure the eclipse temurin JDK for the ubuntu runner. - # Caches dependency in maven pom file. Speeds up workflow. + uses: actions/checkout@v3 + - name: Step 2 - Set up JDK 21 uses: actions/setup-java@v3 with: @@ -30,3 +25,20 @@ jobs: - name: Step 3 - Build and test with Maven run: mvn -B package --file pom.xml + + test: + runs-on: ubuntu-latest + steps: + - name: Step 1 - Checkout the main branches from Github + uses: actions/checkout@v3 + + - name: Step 2 - Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + + - name: Step 3 - Run tests with Maven + run: mvn test +