You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by to...@apache.org on 2022/10/27 18:59:34 UTC
[db-jdo] 02/02: Introduce format check in GitHub action
This is an automated email from the ASF dual-hosted git repository.
tobous pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/db-jdo.git
commit d4eedf726b16950975334356a128b00aced587ea
Author: Tobias Bouschen <to...@googlemail.com>
AuthorDate: Thu Oct 20 17:56:31 2022 +0200
Introduce format check in GitHub action
The check is always run before the build. The TCK is still run if the
formatting check fails.
---
.github/workflows/build.yml | 15 +++++++++++++++
README.md | 4 ++++
parent-pom/pom.xml | 2 +-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c31b939d..7b631ab6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,8 +27,23 @@ on:
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 d0ef390c..facd6a10 100644
--- a/README.md
+++ b/README.md
@@ -183,3 +183,7 @@ There are two profiles to support code formatting using the maven fmt-maven-plug
* `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 3197f6c2..6f25ea31 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>