Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,16 @@ commands:

./codecov --version

# Upload the coverage report.
./codecov upload-coverage $COMMON_ARGS
# Prefer the aggregated multi-module report.
JACOCO_AGG="sqrl-testing/sqrl-coverage/target/site/jacoco-aggregate/jacoco.xml"
if [ -f "$JACOCO_AGG" ]; then
echo "=== Using aggregate JaCoCo report: $JACOCO_AGG ==="
ls -lh "$JACOCO_AGG"
./codecov upload-coverage $COMMON_ARGS --file "$JACOCO_AGG"
else
echo "=== No aggregate JaCoCo report found; skipping coverage upload ==="
# Avoid uploading empty/partial reports (they can drag down overall coverage).
fi

# Upload the test reports.
./codecov do-upload --report-type test_results $COMMON_ARGS
Expand Down Expand Up @@ -289,15 +297,20 @@ jobs:
name: Auth ghcr
command: echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USER" --password-stdin
- run:
name: Build with Docker images
name: Build Docker images
command: mvn -U clean -T1C -B install -DonlyImages -Ddocker.image.tag=local-${CIRCLE_SHA1}
- run:
name: Run container tests using TestContainers
command: |
mvn -B install -DonlyContainerE2E \
-pl :sqrl-testing-container \
-Dsqrl.container.coverage=true \
-Ddocker.image.tag=local-${CIRCLE_SHA1} \
-Dmcp.inspector.version=$MCP_TAG
- run:
name: Generate aggregate JaCoCo report
command: mvn -B -pl :sqrl-coverage -am -DskipTests -DskipITs verify
- save-test-results

deploy:
docker:
Expand All @@ -316,7 +329,7 @@ jobs:
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
- run:
name: Build shaded JAR
command: mvn -U clean -T1C -B deploy -DonlyJars ${CIRCLE_TAG:+-Prelease} -Deasyjacoco.skip=true
command: mvn -U clean -T1C -B deploy -DonlyJars ${CIRCLE_TAG:+-Prelease} -Djacoco.skip=true

build-images:
# use a full VM so we can run Docker / Buildx
Expand Down
26 changes: 0 additions & 26 deletions .mvn/extensions.xml

This file was deleted.

6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ mvn verify
# Coverage report
mvn jacoco:report

# Test specific module (ALWAYS include -Deasyjacoco.skip when using -pl)
mvn test -pl sqrl-planner -Deasyjacoco.skip
# Test specific module
mvn test -pl sqrl-planner

# Test specific test method in module
mvn test -pl sqrl-tools/sqrl-config -Dtest=TestClassName#testMethodName -Deasyjacoco.skip
mvn test -pl sqrl-tools/sqrl-config -Dtest=TestClassName#testMethodName

# Container tests (requires Docker images to be built)
mvn -B install -DonlyContainerE2E -pl :sqrl-testing-container -Dit.test=TestClassName
Expand Down
73 changes: 50 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@

<!-- Plugin versions -->
<dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>
<easy-jacoco-maven-plugin.version>0.1.4</easy-jacoco-maven-plugin.version>
<git-code-format-maven-plugin.version>5.4</git-code-format-maven-plugin.version>
<license-maven-plugin.version>5.0.0</license-maven-plugin.version>
<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
Expand Down Expand Up @@ -855,28 +854,56 @@
<exclude>org/**</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<groupId>com.marvinformatics.jacoco</groupId>
<artifactId>easy-jacoco-maven-plugin</artifactId>
<version>0.1.4</version>
<configuration>
<projectRules>
<rule>
<limits>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
</limits>
</rule>
</projectRules>
<projectExtraProperties>
<license.skip>true</license.skip>
</projectExtraProperties>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<phase>verify</phase>
</execution>
<execution>
<id>report-integration</id>
<goals>
<goal>report-integration</goal>
</goals>
<phase>verify</phase>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
<haltOnFailure>false</haltOnFailure>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
51 changes: 24 additions & 27 deletions sqrl-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -442,36 +442,33 @@
<profile>
<id>instrument</id>

<dependencies>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<version>${jacoco.version}</version>
<classifier>runtime</classifier>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.marvinformatics.jacoco</groupId>
<artifactId>easy-jacoco-maven-plugin</artifactId>
<version>${easy-jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>instrument-uber-jar</id>
<goals>
<goal>instrument-jar</goal>
</goals>
<configuration>
<source>${project.build.directory}/sqrl-cli.jar</source>
<destination>${project.build.directory}/sqrl-cli.jar</destination>
<includes>
<include>com/datasqrl/*</include>
</includes>
</configuration>
</execution>
</executions>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>instrument-uber-jar</id>
<goals>
<goal>instrument</goal>
</goals>
<phase>package</phase>
<configuration>
<includes>
<include>com/datasqrl/**</include>
</includes>
</configuration>
</execution>
<execution>
<id>restore-instrumented-classes</id>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
20 changes: 13 additions & 7 deletions sqrl-server/sqrl-server-vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,29 @@
<build>
<plugins>
<plugin>
<groupId>com.marvinformatics.jacoco</groupId>
<artifactId>easy-jacoco-maven-plugin</artifactId>
<version>${easy-jacoco-maven-plugin.version}</version>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>instrument-uber-jar</id>
<goals>
<goal>instrument-jar</goal>
<goal>instrument</goal>
</goals>
<phase>package</phase>
<configuration>
<source>${project.build.directory}/vertx-server.jar</source>
<destination>${project.build.directory}/vertx-server.jar</destination>
<includes>
<include>com/datasqrl/*</include>
<include>com/datasqrl/**</include>
</includes>
</configuration>
</execution>
<execution>
<id>restore-instrumented-classes</id>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
1 change: 1 addition & 0 deletions sqrl-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

<modules>
<module>sqrl-testing-integration</module>
<module>sqrl-coverage</module>
</modules>

<profiles>
Expand Down
108 changes: 108 additions & 0 deletions sqrl-testing/sqrl-coverage/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright © 2021 DataSQRL (contact@datasqrl.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.datasqrl</groupId>
<artifactId>sqrl-testing</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>sqrl-coverage</artifactId>
<name>SQRL :: Coverage</name>
<packaging>pom</packaging>

<!-- Ensure this module runs after the main reactor modules
so the JaCoCo exec files already exist before aggregation. -->
<dependencies>
<dependency>
<groupId>com.datasqrl</groupId>
<artifactId>sqrl-cli</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.datasqrl</groupId>
<artifactId>sqrl-planner</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.datasqrl</groupId>
<artifactId>sqrl-discovery</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.datasqrl</groupId>
<artifactId>sqrl-server-vertx-base</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report-aggregate</id>
<goals>
<goal>report-aggregate</goal>
</goals>
<phase>verify</phase>
<configuration>
<dataFileIncludes>
<dataFileInclude>**/target/jacoco.exec</dataFileInclude>
<dataFileInclude>**/target/jacoco-it.exec</dataFileInclude>
<dataFileInclude>**/target/jacoco/jacoco-container.exec</dataFileInclude>
</dataFileIncludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<!-- When container testing is enabled, force Maven reactor order:
sqrl-testing-container -> sqrl-coverage. This ensures container-produced
JaCoCo exec files exist before aggregation runs. -->
<profile>
<id>include-container-testing</id>
<dependencies>
<dependency>
<groupId>com.datasqrl</groupId>
<artifactId>sqrl-testing-container</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>

<profile>
<id>dev</id>
<dependencies>
<dependency>
<groupId>com.datasqrl</groupId>
<artifactId>sqrl-testing-container</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Loading