Introduce format check in GitHub action
The check is always run before the build. The TCK is still run if the
formatting check fails.
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c31b939..7b631ab 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,8 +27,23 @@
pull_request:
jobs:
+ format-check:
+ name: Check Code Formatting
+ continue-on-error: true
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+ - name: Check Format
+ run: |
+ mvn -Pverify-format clean compile
+ shell: 'bash'
+
build-jdo:
name: Build JDO & Run TCK
+ needs: format-check
runs-on: ubuntu-latest
strategy:
matrix:
diff --git a/README.md b/README.md
index d0ef390..facd6a1 100644
--- a/README.md
+++ b/README.md
@@ -183,3 +183,7 @@
* `format` reformats the project's Java files.
mvn -Pformat clean compile
+
+#### GitHub Action Integration
+
+The formatting of the code is checked automatically through the GitHub actions for every PR and/or push on master.
diff --git a/parent-pom/pom.xml b/parent-pom/pom.xml
index 3197f6c..6f25ea3 100644
--- a/parent-pom/pom.xml
+++ b/parent-pom/pom.xml
@@ -436,7 +436,7 @@
<configuration>
<displayLimit>1000</displayLimit>
<verbose>true</verbose>
- <failOnError>false</failOnError>
+ <failOnError>true</failOnError>
</configuration>
<executions>
<execution>