Skip to content
Merged
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: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and run unit tests
on:
push:
pull_request:

# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Build and run unit tests
run: mvn --batch-mode clean install
28 changes: 28 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<version.gpg.plugin>1.5</version.gpg.plugin>
<version.install.plugin>2.5.2</version.install.plugin>
<version.jacoco.plugin>0.8.10</version.jacoco.plugin>
<version.japicmp.plugin>0.20.0</version.japicmp.plugin>
<version.javadoc.plugin>3.4.0</version.javadoc.plugin>
<version.source.plugin>3.2.1</version.source.plugin>
<version.jar.plugin>3.3.0</version.jar.plugin>
Expand Down Expand Up @@ -393,6 +394,11 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco.plugin}</version>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>${version.japicmp.plugin}</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand Down Expand Up @@ -457,6 +463,28 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<configuration>
<!-- Old and new versions are not specified, so we compare the latest released version with the build artefact -->
<parameter>
<!-- Break the build in case the semantic versioning is violated -->
<breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
<!-- Output only modified classes/methods in the report -->
<onlyModified>true</onlyModified>
</parameter>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>cmp</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down