aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Hrisafov <filip.hrisafov@gmail.com>2024-01-04 21:23:12 +0100
committerGunnar Morling <gunnar.morling@googlemail.com>2024-01-04 21:45:24 +0100
commite5d074651fda427bd0ff96f1aea7e9ef9cc88a23 (patch)
treee82c9afe75e0804434ed4b435e373f869f4527b2
parentd7b1f3d86d20db529cd1ebd43789f2151e34ee04 (diff)
#63 CI build should fail if formatting is incorrect
-rw-r--r--.github/workflows/maven.yml2
-rw-r--r--pom.xml20
2 files changed, 21 insertions, 1 deletions
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 27c5165..b5f0965 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -46,4 +46,4 @@ jobs:
restore-keys: ${{ runner.os }}-m2
- name: 'Build project'
- run: mvn -B clean verify
+ run: mvn -B clean verify -Pci
diff --git a/pom.xml b/pom.xml
index 477a56e..61cb80f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -165,6 +165,26 @@
</build>
<profiles>
<profile>
+ <id>ci</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>validate-format</id>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ <phase>validate</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>qa</id>
<activation>
<property>