Skip to content

Deploy the app using Docker Compose #48

Deploy the app using Docker Compose

Deploy the app using Docker Compose #48

name: Run unit tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
java-version: [21]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
C:\Users\runneradmin\.m2\repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven on Linux
if: runner.os == 'Linux'
run: mvn -B clean install -DinteractiveMode=false
- name: Build with Maven on Windows
if: runner.os == 'Windows'
run: cmd /c mvn -B clean install -DinteractiveMode=false
- name: Run unit tests on Linux
if: runner.os == 'Linux'
run: mvn -B test -DinteractiveMode=false
- name: Run unit tests on Windows
if: runner.os == 'Windows'
run: cmd /c mvn -B test -DinteractiveMode=false