From 54513a6dafe26813425455a9202bc8bfaa02085d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20=C4=8Cerpnjak?= Date: Wed, 20 Mar 2024 17:04:44 +0100 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e4e844..1b0ae3a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: - '!README.md' jobs: - build-test-package: + test-user-management-api: runs-on: ubuntu-latest steps: @@ -31,7 +31,7 @@ jobs: working-directory: ./UserManagementAPI run: mvn -B package --file pom.xml - build-test-orders-api: + test-order-processing-api: runs-on: ubuntu-latest steps: @@ -65,3 +65,38 @@ jobs: - name: Run tests working-directory: ./OrderProcessingAPI run: ./gradlew test + + test-restaurant-management-api: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.10.0 + with: + mongodb-version: 7.0.6 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + cache: gradle + + - name: Make gradlew executable (if needed) + working-directory: ./RestaurantManagementAPI + run: chmod +x ./gradlew + + - name: Setup Gradle + working-directory: ./RestaurantManagementAPI + run: gradle wrapper --gradle-version 8.5 + + - name: Build with Gradle + working-directory: ./RestaurantManagementAPI + run: ./gradlew build --no-daemon + + - name: Run tests + working-directory: ./RestaurantManagementAPI + run: ./gradlew test