Skip to content

Commit

Permalink
update for sending coverage data to coveralls.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Oct 10, 2020
1 parent 4a15865 commit a613840
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ script:
- mvn install

after_success:
- mvn -DrepoToken=$COVERALLS_TOKEN clean test jacoco:report coveralls:report
- mvn -DrepoToken=$COVERALLS_TOKEN clean verify jacoco:report coveralls:report

cache:
directories:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ define _createDist
endef

package:
mvn package
mvn verify

dist: $(DIST) package
@$(call _createDist,darwin,amd64,)
Expand Down
43 changes: 31 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<module>kunai2</module>
<module>pochi-api</module>
<module>pochi-core</module>
<module>site</module>
</modules>

<name>pochi: extensible Java birthmark toolkit</name>
Expand Down Expand Up @@ -175,15 +176,36 @@
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.3</version>
</dependency>
</dependencies>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<jacocoReports>site/static/jacoco/jacoco.xml</jacocoReports>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<!-- https://stackoverflow.com/questions/41988302/jacoco-merge-goal-cant-find-data-files-for-child-modules#answer-49425413 -->
<configuration>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>kunai2/target/jacoco.exec</include>
<include>pochi-api/target/jacoco.exec</include>
<include>pochi-core/target/jacoco.exec</include>
</includes>
</fileSet>
</fileSets>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -193,24 +215,21 @@
</execution>
<execution>
<id>merge</id>
<phase>verify</phase>
<phase>post-integration-test</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>kunai2/target/jacoco.exec</include>
<include>pochi-api/target/jacoco.exec</include>
<include>pochi-core/target/jacoco.exec</include>
</includes>
</fileSet>
</fileSets>
<destFile>${project.build.directory}/pochi_jacoco.exec</destFile>
<destFile>${project.build.directory}/jacoco_aggregate.exec</destFile>
</configuration>
</execution>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>

Expand Down
1 change: 1 addition & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
msp
resources/javadoc/targets
static/apidocs
static/jacoco

### https://raw.github.com/github/gitignore/218a941be92679ce67d0484547e3e142b2f5f6f0/community/Golang/Hugo.gitignore

Expand Down
84 changes: 84 additions & 0 deletions site/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<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">

<parent>
<groupId>jp.cafebabe</groupId>
<artifactId>pochi</artifactId>
<version>2.0.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<groupId>jp.cafebabe.pochi</groupId>
<artifactId>site</artifactId>
<packaging>pom</packaging>

<name>site</name>
<url>https://tamada.github.io/pochi</url>

<dependencies>
<dependency>
<groupId>jp.cafebabe.pochi</groupId>
<artifactId>kunai2</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jp.cafebabe.pochi</groupId>
<artifactId>pochi-api</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jp.cafebabe.pochi</groupId>
<artifactId>pochi-core</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<!-- https://stackoverflow.com/questions/41988302/jacoco-merge-goal-cant-find-data-files-for-child-modules#answer-49425413 -->
<configuration>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>kunai2/target/jacoco.exec</include>
<include>pochi-api/target/jacoco.exec</include>
<include>pochi-core/target/jacoco.exec</include>
</includes>
</fileSet>
</fileSets>
</configuration>
<executions>
<execution>
<id>merge</id>
<phase>post-integration-test</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/jacoco_aggregate.exec</destFile>
</configuration>
</execution>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<outputDirectory>static/jacoco</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit a613840

Please sign in to comment.