You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/04/28 17:31:18 UTC

[camel] branch main updated: (chores) ci: run format and checkstyle builds regularly

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 9f233334cf4 (chores) ci: run format and checkstyle builds regularly
9f233334cf4 is described below

commit 9f233334cf4e827ef7fa92e62f63cf396b108b6b
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Apr 28 19:30:36 2022 +0200

    (chores) ci: run format and checkstyle builds regularly
---
 ...er-push-build.yml => main-checkstyle-build.yml} | 43 +++++++---------------
 .../{master-push-build.yml => main-push-build.yml} |  8 ++--
 2 files changed, 17 insertions(+), 34 deletions(-)

diff --git a/.github/workflows/master-push-build.yml b/.github/workflows/main-checkstyle-build.yml
similarity index 51%
copy from .github/workflows/master-push-build.yml
copy to .github/workflows/main-checkstyle-build.yml
index 1828324d252..7aee25b0ae6 100644
--- a/.github/workflows/master-push-build.yml
+++ b/.github/workflows/main-checkstyle-build.yml
@@ -15,19 +15,14 @@
 # limitations under the License.
 #
 
-name: build
+name: checkstyle build
 
 on:
-  push:
-    branches:
-      - main
-    paths-ignore:
-      - .github/**/*
-      - README.md
-      - SECURITY.md
-      - Jenkinsfile
-      - Jenkinsfile.*
-      - NOTICE.txt
+  schedule:
+# Every 5th minute every 3 hours during working days
+    - cron: '5 */3 * * 1-5'
+# Every 6 hours during weekends ... we don't want to be flooded with emails
+    - cron: '30 */6 * * 6-7'
 
 jobs:
   build:
@@ -48,22 +43,10 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
       - name: mvn sourcecheck
-        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -Dmvnd.threads=2 -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress -Psourcecheck -Dcheckstyle.failOnViolation=true -DskipTests checkstyle:checkstyle verify
-      - name: Create Pull Request
-        uses: peter-evans/create-pull-request@v3
-        with:
-          base: main
-          token: ${{ secrets.GITHUB_TOKEN }}
-          commit-message: "Regen for commit ${{ github.sha }}"
-          committer: GitHub <no...@github.com>
-          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
-          signoff: true
-          branch: regen_bot
-          title: "Generated sources regen"
-          body: |
-            Regen bot :robot: found some uncommited changes after running build on :camel: main.
-            Please do not delete `regen_bot` branch after merge/rebase.
-          labels: |
-            regen
-            automated pr
-          assignees: oscerd
+        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -l checkstyle.log -Dmvnd.threads=2 -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress -Psourcecheck -Dcheckstyle.failOnViolation=true -DskipTests checkstyle:checkstyle verify
+      - name: archive logs
+          uses: actions/upload-artifact@v3
+          if: always()
+          with:
+            name: checkstyle.log
+            path: checkstyle.log
diff --git a/.github/workflows/master-push-build.yml b/.github/workflows/main-push-build.yml
similarity index 90%
rename from .github/workflows/master-push-build.yml
rename to .github/workflows/main-push-build.yml
index 1828324d252..12db7f9ff4a 100644
--- a/.github/workflows/master-push-build.yml
+++ b/.github/workflows/main-push-build.yml
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-name: build
+name: reformat and build
 
 on:
   push:
@@ -47,8 +47,8 @@ jobs:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
           cache: 'maven'
-      - name: mvn sourcecheck
-        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -Dmvnd.threads=2 -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress -Psourcecheck -Dcheckstyle.failOnViolation=true -DskipTests checkstyle:checkstyle verify
+      - name: mvn formatter and build
+        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -Dmvnd.threads=2 -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress -Pformat,fastinstall -DskipTests verify
       - name: Create Pull Request
         uses: peter-evans/create-pull-request@v3
         with:
@@ -61,7 +61,7 @@ jobs:
           branch: regen_bot
           title: "Generated sources regen"
           body: |
-            Regen bot :robot: found some uncommited changes after running build on :camel: main.
+            Regen bot :robot: found some uncommitted changes after running build on :camel: main.
             Please do not delete `regen_bot` branch after merge/rebase.
           labels: |
             regen