You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2022/11/11 19:26:54 UTC

[incubator-pekko-persistence-dynamodb] branch main updated: Add github workflow to check scala code is formatted (#3)

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

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


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

commit fd86bcc38dcfed6ada5f460fac7071cf428854a1
Author: Matthew de Detrich <ma...@aiven.io>
AuthorDate: Fri Nov 11 20:26:49 2022 +0100

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

diff --git a/.github/workflows/check-build-test.yml b/.github/workflows/check-build-test.yml
index 8105c58..1fc2ddf 100644
--- a/.github/workflows/check-build-test.yml
+++ b/.github/workflows/check-build-test.yml
@@ -41,9 +41,6 @@ jobs:
       - name: Compile all code with default compiler
         run: sbt Test/compile
 
-      - name: Format check
-        run: sbt scalafmtCheckAll
-
   test:
     name: Build and Test
     runs-on: ubuntu-20.04
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
new file mode 100644
index 0000000..9ce98e5
--- /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