Skip to content

Update main.yml

Update main.yml #4

Workflow file for this run

name: Run unit tests
on:
push:
branches: [ "main" ]
jobs:
build-test-package:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
options: --health-cmd "mongo --eval 'db.adminCommand(\"ping\")'" --health-interval 10s --health-timeout 5s --health-retries 3
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build and test with Maven
working-directory: ./UserManagementAPI
run: mvn -B package --file pom.xml