Update main.yml #28
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@v2 | |
- name: Run build with Gradle Wrapper | |
working-directory: ./UserManagementAPI | |
run: ./gradlew build | |
- name: Test Orders gRPC API | |
working-directory: ./UserManagementAPI | |
run: ./gradlew test |