Update main.yml #22
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: Run unit tests | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- '**/*' | |
- '!README.md' | |
jobs: | |
build-test-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: 7.0.6 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build and test User Management API | |
working-directory: ./UserManagementAPI | |
run: mvn -B package --file pom.xml | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- run: gradle wrapper 8.5 | |
- run: chmod +x gradlew | |
- name: Build Orders gRPC API | |
working-directory: ./OrderProcessingAPI | |
run: ./gradlew build | |
- name: Test Orders gRPC API | |
run: ./gradlew test |