You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by md...@apache.org on 2022/11/05 18:42:57 UTC

[incubator-pekko] branch main updated: Add github workflow to check scala code is formatted

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

mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new 1ca5139f28 Add github workflow to check scala code is formatted
1ca5139f28 is described below

commit 1ca5139f28f0abec3c49736a47afe6b94a231858
Author: Matthew de Detrich <ma...@aiven.io>
AuthorDate: Sat Nov 5 15:53:07 2022 +0100

    Add github workflow to check scala code is formatted
---
 .github/workflows/build-test-prValidation.yml |  8 ++++----
 .github/workflows/format.yml                  | 24 ++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build-test-prValidation.yml b/.github/workflows/build-test-prValidation.yml
index 8cdeb7e270..f1f53223d6 100644
--- a/.github/workflows/build-test-prValidation.yml
+++ b/.github/workflows/build-test-prValidation.yml
@@ -9,8 +9,8 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-  check-code-style:
-    name: Check / Code Style
+  check-headers:
+    name: Check / Headers
     runs-on: ubuntu-20.04
     steps:
       - name: Checkout
@@ -27,12 +27,12 @@ jobs:
       - name: Cache Coursier cache
         uses: coursier/cache-action@v6.2
 
-      - name: Code style check
+      - name: Check headers
         run: |-
           sbt -jvm-opts .jvmopts-ci \
           -Dsbt.override.build.repos=false \
           -Dsbt.log.noformat=false \
-          verifyCodeStyle
+          headerCheckAll
 
   pull-request-validation:
     name: Check / Tests
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
new file mode 100644
index 0000000000..9ce98e557c
--- /dev/null
+++ b/.github/workflows/format.yml
@@ -0,0 +1,24 @@
+name: Scalafmt
+
+permissions: read-all
+
+on:
+  pull_request:
+    branches: ['**']
+
+jobs:
+  build:
+    name: Code is formatted
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout current branch (full)
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+          persist-credentials: false
+
+      - name: Check project is formatted
+        uses: jrouly/scalafmt-native-action@v2
+        with:
+          version: '3.6.1'
+          arguments: '--list --mode diff-ref=origin/main'


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org