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 2023/02/28 13:28:00 UTC

[incubator-pekko-persistence-cassandra] branch main updated: Updates github workflows to follow other projects

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-persistence-cassandra.git


The following commit(s) were added to refs/heads/main by this push:
     new a0fef76  Updates github workflows to follow other projects
a0fef76 is described below

commit a0fef76096895289f2e20bfac05a827f545dda2c
Author: Nicolas Vollmar <nv...@scaling.ch>
AuthorDate: Tue Feb 28 11:40:24 2023 +0100

    Updates github workflows to follow other projects
---
 .github/workflows/check-build-test.yml         | 117 -------------------------
 .github/workflows/checks.yml                   |  73 +++++++++++++++
 .github/workflows/format.yml                   |  24 +++++
 .github/workflows/{publish.yml => release.yml} |   2 +-
 .github/workflows/unit-tests.yml               |  55 ++++++++++++
 .idea/runConfigurations/Main_2551_write.xml    |   1 +
 .idea/runConfigurations/Main_2552_write.xml    |   1 +
 .idea/runConfigurations/Main_2553_load_.xml    |   1 +
 .idea/runConfigurations/Main_2554_read.xml     |   1 +
 .scalafmt.conf                                 |   2 +-
 10 files changed, 158 insertions(+), 119 deletions(-)

diff --git a/.github/workflows/check-build-test.yml b/.github/workflows/check-build-test.yml
deleted file mode 100644
index fb98ae1..0000000
--- a/.github/workflows/check-build-test.yml
+++ /dev/null
@@ -1,117 +0,0 @@
-name: CI
-
-on:
-  pull_request:
-  push:
-    branches:
-      - master
-      - main
-    tags-ignore:
-      - v*
-
-jobs:
-  style-compile:
-    name: Check Code Style
-    if: github.repository == 'apache/incubator-pekko-persistence-cassandra'
-    runs-on: ubuntu-20.04
-    env:
-      JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
-
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v3
-        with: # https://github.com/olafurpg/setup-scala#faster-checkout-of-big-repos
-          fetch-depth: 0
-
-      # temporarily disable git fetch of tags (no tags currently) 
-      #- name: Fetch tags
-      #  run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
-
-      - name: Setup Java 11
-        uses: actions/setup-java@v3
-        with:
-          distribution: temurin
-          java-version: 11
-
-      - name: Cache Coursier cache
-        uses: coursier/cache-action@v6.4.0
-
-      - name: Compilation and binary-compatibility check
-        run: sbt "verifyCodeStyle; +Test/compile" # todo: add mimaReportBinaryIssues
-
-
-  documentation:
-    name: ScalaDoc, Documentation with Paradox
-    if: github.repository == 'apache/incubator-pekko-persistence-cassandra'
-    runs-on: ubuntu-20.04
-    env:
-      JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
-
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v3
-        with: # https://github.com/olafurpg/setup-scala#faster-checkout-of-big-repos
-          fetch-depth: 100
-
-      # temporarily disable git fetch of tags (no tags currently) 
-      #- name: Fetch tags
-      #  run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
-
-      - name: Setup Java 11
-        uses: actions/setup-java@v3
-        with:
-          distribution: temurin
-          java-version: 11
-
-      - name: Cache Coursier cache
-        uses: coursier/cache-action@v6.4.0
-
-      - name: "Create all API docs and create site with Paradox"
-        run: sbt "unidoc; docs/makeSite"
-
-      # temporarily disable link validator
-      #- name: Run Link Validator
-      #  run: cs launch net.runne::site-link-validator:0.2.2 -- project/link-validator.conf
-
-  test:
-    name: Test
-    if: github.repository == 'apache/incubator-pekko-persistence-cassandra'
-    runs-on: ubuntu-20.04
-
-    strategy:
-      fail-fast: false
-      matrix:
-        include:
-          - { jdk: '8',  container: "cassandra-latest",  scalaVersion: "++2.13.10", test: "test" }
-          - { jdk: '11', container: "cassandra-latest",  scalaVersion: "++2.12.17", test: "test" }
-          - { jdk: '11', container: "cassandra-latest",  scalaVersion: "++2.13.10", test: "test" }
-          - { jdk: '11', container: "cassandra2",        scalaVersion: "++2.13.10", test: "'testOnly -- -l RequiresCassandraThree'"}
-          - { jdk: '11', container: "cassandra3",        scalaVersion: "++2.13.10", test: "test" }
-
-    env:
-      JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
-
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v3
-        with:
-          fetch-depth: 0
-
-      - name: Checkout GitHub merge
-        if: github.event.pull_request
-        run: |-
-          git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
-          git checkout scratch
-
-      - name: Setup Java ${{ matrix.jdk }}
-        uses: actions/setup-java@v3
-        with:
-          distribution: temurin
-          java-version: ${{ matrix.jdk }}
-
-      - name: Cache Coursier cache
-        uses: coursier/cache-action@v6.4.0
-
-      - name: Test against ${{ matrix.container }}
-        run: |-
-          docker-compose up -d ${{ matrix.container }} && sbt ${{ matrix.scalaVersion }} ${{matrix.test}}
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
new file mode 100644
index 0000000..a07ffdf
--- /dev/null
+++ b/.github/workflows/checks.yml
@@ -0,0 +1,73 @@
+name: Basic checks
+
+on:
+  pull_request:
+  push:
+    branches:
+      - main
+      - release-*
+    tags-ignore: [ v.* ]
+
+jobs:
+  check-code-style:
+    name: Check Code Style
+    if: github.repository == 'apache/incubator-pekko-persistence-cassandra'
+    runs-on: ubuntu-20.04
+    env:
+      JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+
+      - name: Checkout GitHub merge
+        if: github.event.pull_request
+        run: |-
+          git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
+          git checkout scratch
+
+      - name: Setup Java 11
+        uses: actions/setup-java@v3
+        with:
+          distribution: temurin
+          java-version: 11
+
+      - name: Cache Coursier cache
+        uses: coursier/cache-action@v6.4.0
+
+      - name: Compilation and binary-compatibility check
+        run: sbt "verifyCodeStyle; +Test/compile" # todo: add mimaReportBinaryIssues
+
+
+  check-docs::
+    name: ScalaDoc, Documentation with Paradox
+    if: github.repository == 'apache/incubator-pekko-persistence-cassandra'
+    runs-on: ubuntu-20.04
+    env:
+      JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+
+      - name: Checkout GitHub merge
+        if: github.event.pull_request
+        run: |-
+          git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
+          git checkout scratch
+
+      - name: Setup Java 11
+        uses: actions/setup-java@v3
+        with:
+          distribution: temurin
+          java-version: 11
+
+      - name: Cache Coursier cache
+        uses: coursier/cache-action@v6.4.0
+
+      - name: Create all API docs for artifacts/website and all reference docs
+        run: sbt "unidoc; docs/paradox"
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
new file mode 100644
index 0000000..9d330b6
--- /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@v3
+        with:
+          fetch-depth: 0
+          persist-credentials: false
+
+      - name: Check project is formatted
+        uses: jrouly/scalafmt-native-action@v2
+        with:
+          version: '3.7.1'
+          arguments: '--list --mode diff-ref=origin/main'
diff --git a/.github/workflows/publish.yml b/.github/workflows/release.yml
similarity index 94%
rename from .github/workflows/publish.yml
rename to .github/workflows/release.yml
index c74aa67..32b60ef 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/release.yml
@@ -11,7 +11,7 @@ on:
 jobs:
   release:
     # runs on main repo only
-    if: github.repository == 'apache/incubator-pekko-persistence-cassandra'
+    if: false # github.repository == 'apache/incubator-pekko-persistence-cassandra'
     name: Release
     environment: release
     runs-on: ubuntu-20.04
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
new file mode 100644
index 0000000..3553c50
--- /dev/null
+++ b/.github/workflows/unit-tests.yml
@@ -0,0 +1,55 @@
+name: Unit Tests
+
+on:
+  pull_request:
+  push:
+    branches:
+      - main
+      - release-*
+    tags-ignore: [ v.* ]
+  schedule:
+    - cron: '0 2 * * *'  # every day 2am
+
+jobs:
+  test:
+    name: Test
+    if: github.repository == 'apache/incubator-pekko-persistence-cassandra'
+    runs-on: ubuntu-20.04
+
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - { jdk: '8',  container: "cassandra-latest",  scalaVersion: "++2.13.10", test: "test" }
+          - { jdk: '11', container: "cassandra-latest",  scalaVersion: "++2.12.17", test: "test" }
+          - { jdk: '11', container: "cassandra-latest",  scalaVersion: "++2.13.10", test: "test" }
+          - { jdk: '11', container: "cassandra2",        scalaVersion: "++2.13.10", test: "'testOnly -- -l RequiresCassandraThree'"}
+          - { jdk: '11', container: "cassandra3",        scalaVersion: "++2.13.10", test: "test" }
+
+    env:
+      JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+
+      - name: Checkout GitHub merge
+        if: github.event.pull_request
+        run: |-
+          git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
+          git checkout scratch
+
+      - name: Setup Java ${{ matrix.jdk }}
+        uses: actions/setup-java@v3
+        with:
+          distribution: temurin
+          java-version: ${{ matrix.jdk }}
+
+      - name: Cache Coursier cache
+        uses: coursier/cache-action@v6.4.0
+
+      - name: Test against ${{ matrix.container }}
+        run: |-
+          docker-compose up -d ${{ matrix.container }} && sbt ${{ matrix.scalaVersion }} ${{matrix.test}}
diff --git a/.idea/runConfigurations/Main_2551_write.xml b/.idea/runConfigurations/Main_2551_write.xml
index b3a65a9..f3097db 100644
--- a/.idea/runConfigurations/Main_2551_write.xml
+++ b/.idea/runConfigurations/Main_2551_write.xml
@@ -11,6 +11,7 @@
     </extension>
     <method v="2">
       <option name="Make" enabled="true" />
+      <option name="BSP.BeforeRunTask" enabled="true" />
     </method>
   </configuration>
 </component>
\ No newline at end of file
diff --git a/.idea/runConfigurations/Main_2552_write.xml b/.idea/runConfigurations/Main_2552_write.xml
index bd224b1..7c94408 100644
--- a/.idea/runConfigurations/Main_2552_write.xml
+++ b/.idea/runConfigurations/Main_2552_write.xml
@@ -11,6 +11,7 @@
     </extension>
     <method v="2">
       <option name="Make" enabled="true" />
+      <option name="BSP.BeforeRunTask" enabled="true" />
     </method>
   </configuration>
 </component>
\ No newline at end of file
diff --git a/.idea/runConfigurations/Main_2553_load_.xml b/.idea/runConfigurations/Main_2553_load_.xml
index b15e28d..016acf6 100644
--- a/.idea/runConfigurations/Main_2553_load_.xml
+++ b/.idea/runConfigurations/Main_2553_load_.xml
@@ -11,6 +11,7 @@
     </extension>
     <method v="2">
       <option name="Make" enabled="true" />
+      <option name="BSP.BeforeRunTask" enabled="true" />
     </method>
   </configuration>
 </component>
\ No newline at end of file
diff --git a/.idea/runConfigurations/Main_2554_read.xml b/.idea/runConfigurations/Main_2554_read.xml
index c884d57..853d2f2 100644
--- a/.idea/runConfigurations/Main_2554_read.xml
+++ b/.idea/runConfigurations/Main_2554_read.xml
@@ -11,6 +11,7 @@
     </extension>
     <method v="2">
       <option name="Make" enabled="true" />
+      <option name="BSP.BeforeRunTask" enabled="true" />
     </method>
   </configuration>
 </component>
\ No newline at end of file
diff --git a/.scalafmt.conf b/.scalafmt.conf
index 2ca4ece..8bb7238 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version                                  = 3.6.1
+version                                  = 3.7.1
 runner.dialect                           = scala213
 project.git                              = true
 style                                    = defaultWithAlign


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