setup coverate report generation

This commit is contained in:
2025-12-05 18:20:51 +01:00
parent c5c602d599
commit f9cbb1b596
12 changed files with 1142 additions and 387 deletions

30
Dockerfile.coverage Normal file
View File

@ -0,0 +1,30 @@
# Multi-stage build for code coverage
FROM maven:3.8.6-openjdk-8 AS builder
# Set working directory
WORKDIR /app
# Copy pom.xml and src
COPY pom.xml .
COPY src ./src
# Build with tests
RUN mvn clean package -DskipTests=false
# Create a separate stage for running tests with coverage
FROM maven:3.8.6-openjdk-8
# Set working directory
WORKDIR /app
# Copy the built project
COPY --from=builder /app/target/*.war /app/app.war
# Install dependencies for coverage reporting
RUN apt-get update && apt-get install -y wget unzip
# Create a script to run tests with coverage
COPY scripts/ .
# Run tests with coverage
CMD ["mvn", "test"]