From 718fc2d7eb61e332a00bca5b493342aee8af77e7 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Thu, 7 Jan 2021 16:48:03 -0700 Subject: [PATCH 01/13] add initial sbt ci release settings for gh actions --- build.sbt | 16 ++++++++++++++++ project/plugins.sbt | 15 ++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 52472aec..069f55de 100644 --- a/build.sbt +++ b/build.sbt @@ -160,3 +160,19 @@ lazy val mavenSettings = Seq( false } ) + +val Scala213 = "2.13.3" +val Scala212 = "2.12.12" +val Jdk11 = "openjdk@1.11-0" + +ThisBuild / scalaVersion := Scala213 +ThisBuild / crossScalaVersions := Seq(Scala213, Scala212) +ThisBuild / githubWorkflowJavaVersions := Seq(Jdk11) +//sbt-ci-release settings +ThisBuild / githubWorkflowTargetTags ++= Seq("v*") +ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))) +ThisBuild / githubWorkflowPublishPreamble := Seq(WorkflowStep.Use("olafurpg", "setup-gpg", "v3")) +ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("ci-release"))) +ThisBuild / githubWorkflowEnv ++= List("PGP_PASSPHRASE", "PGP_SECRET", "SONATYPE_PASSWORD", "SONATYPE_USERNAME").map { envKey => + envKey -> s"$${{ secrets.$envKey }}" +}.toMap diff --git a/project/plugins.sbt b/project/plugins.sbt index 101dd5ce..54b0e1fa 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,8 @@ -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") -addSbtPlugin("com.47deg" % "sbt-microsites" % "1.1.5") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.14") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") +addSbtPlugin("com.47deg" % "sbt-microsites" % "1.1.5") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") +addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.14") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") +addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.9.5") From def9a8808b7b946660fd5c65a889a52a9cbb9769 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Fri, 8 Jan 2021 12:23:11 -0700 Subject: [PATCH 02/13] add steps for setup and docs truthfully not sure this is the right way to go about doing this, but seems like a step in the right direction --- .github/workflows/ci.yml | 137 ++++++++++++++++++++++++++++++++++++ .github/workflows/clean.yml | 59 ++++++++++++++++ build.sbt | 6 ++ 3 files changed, 202 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/clean.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..da1c13c5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,137 @@ +# This file was automatically generated by sbt-github-actions using the +# githubWorkflowGenerate task. You should add and commit this file to +# your git repository. It goes without saying that you shouldn't edit +# this file by hand! Instead, if you wish to make changes, you should +# change your sbt build configuration to revise the workflow description +# to meet your needs, then regenerate this file. + +name: Continuous Integration + +on: + pull_request: + branches: ['*'] + push: + branches: ['*'] + tags: [v*] + +env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + build: + name: Build and Test + strategy: + matrix: + os: [ubuntu-latest] + scala: [2.13.3, 2.12.12] + java: [openjdk@1.11-0] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Java and Scala + uses: olafurpg/setup-scala@v10 + with: + java-version: ${{ matrix.java }} + + - name: Cache sbt + uses: actions/cache@v2 + with: + path: | + ~/.sbt + ~/.ivy2/cache + ~/.coursier/cache/v1 + ~/.cache/coursier/v1 + ~/AppData/Local/Coursier/Cache/v1 + ~/Library/Caches/Coursier/v1 + key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Check that workflows are up to date + run: sbt ++${{ matrix.scala }} githubWorkflowCheck + + - name: Check formatting + run: sbt ++${{ matrix.scala }} scalafmtCheckAll + + - name: Setup + run: | + make travis-install + make travis-run + + - name: Run tests + run: sbt ++${{ matrix.scala }} test + + - name: Compile Docs + run: sbt ++${{ matrix.scala }} docs/mdoc + + - name: Compress target directories + run: tar cf targets.tar modules/benchmarks/target target modules/docs/target modules/tests/target modules/caffeine/target modules/memcached/target modules/circe/target modules/redis/target modules/core/target project/target + + - name: Upload target directories + uses: actions/upload-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} + path: targets.tar + + publish: + name: Publish Artifacts + needs: [build] + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + strategy: + matrix: + os: [ubuntu-latest] + scala: [2.13.3] + java: [openjdk@1.11-0] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Java and Scala + uses: olafurpg/setup-scala@v10 + with: + java-version: ${{ matrix.java }} + + - name: Cache sbt + uses: actions/cache@v2 + with: + path: | + ~/.sbt + ~/.ivy2/cache + ~/.coursier/cache/v1 + ~/.cache/coursier/v1 + ~/AppData/Local/Coursier/Cache/v1 + ~/Library/Caches/Coursier/v1 + key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Download target directories (2.13.3) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-2.13.3-${{ matrix.java }} + + - name: Inflate target directories (2.13.3) + run: | + tar xf targets.tar + rm targets.tar + + - name: Download target directories (2.12.12) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-2.12.12-${{ matrix.java }} + + - name: Inflate target directories (2.12.12) + run: | + tar xf targets.tar + rm targets.tar + + - uses: olafurpg/setup-gpg@v3 + + - run: sbt ++${{ matrix.scala }} ci-release \ No newline at end of file diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml new file mode 100644 index 00000000..b535fcc1 --- /dev/null +++ b/.github/workflows/clean.yml @@ -0,0 +1,59 @@ +# This file was automatically generated by sbt-github-actions using the +# githubWorkflowGenerate task. You should add and commit this file to +# your git repository. It goes without saying that you shouldn't edit +# this file by hand! Instead, if you wish to make changes, you should +# change your sbt build configuration to revise the workflow description +# to meet your needs, then regenerate this file. + +name: Clean + +on: push + +jobs: + delete-artifacts: + name: Delete Artifacts + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Delete artifacts + run: | + # Customize those three lines with your repository and credentials: + REPO=${GITHUB_API_URL}/repos/${{ github.repository }} + + # A shortcut to call GitHub API. + ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } + + # A temporary file which receives HTTP response headers. + TMPFILE=/tmp/tmp.$$ + + # An associative array, key: artifact name, value: number of artifacts of that name. + declare -A ARTCOUNT + + # Process all artifacts on this repository, loop on returned "pages". + URL=$REPO/actions/artifacts + while [[ -n "$URL" ]]; do + + # Get current page, get response headers in a temporary file. + JSON=$(ghapi --dump-header $TMPFILE "$URL") + + # Get URL of next page. Will be empty if we are at the last page. + URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*.*//') + rm -f $TMPFILE + + # Number of artifacts on this page: + COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') )) + + # Loop on all artifacts on this page. + for ((i=0; $i < $COUNT; i++)); do + + # Get name of artifact and count instances of this name. + name=$(jq <<<$JSON -r ".artifacts[$i].name?") + ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1)) + + id=$(jq <<<$JSON -r ".artifacts[$i].id?") + size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") )) + printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size + ghapi -X DELETE $REPO/actions/artifacts/$id + done + done \ No newline at end of file diff --git a/build.sbt b/build.sbt index 069f55de..024e63c1 100644 --- a/build.sbt +++ b/build.sbt @@ -168,6 +168,12 @@ val Jdk11 = "openjdk@1.11-0" ThisBuild / scalaVersion := Scala213 ThisBuild / crossScalaVersions := Seq(Scala213, Scala212) ThisBuild / githubWorkflowJavaVersions := Seq(Jdk11) +ThisBuild / githubWorkflowBuild := Seq( + WorkflowStep.Sbt(List("scalafmtCheckAll"), name = Some("Check formatting")), + WorkflowStep.Run(List("make travis-install", "make travis-run"), name = Some("Setup")), + WorkflowStep.Sbt(List("test"), name = Some("Run tests")), + WorkflowStep.Sbt(List("docs/mdoc"), name = Some("Compile Docs")) +) //sbt-ci-release settings ThisBuild / githubWorkflowTargetTags ++= Seq("v*") ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))) From 850db9be646b7314e658f2bdedc36fe48a2703a5 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Fri, 8 Jan 2021 13:58:44 -0700 Subject: [PATCH 03/13] update jdk version to be valid --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 024e63c1..33254c00 100644 --- a/build.sbt +++ b/build.sbt @@ -163,7 +163,7 @@ lazy val mavenSettings = Seq( val Scala213 = "2.13.3" val Scala212 = "2.12.12" -val Jdk11 = "openjdk@1.11-0" +val Jdk11 = "openjdk@1.11.0" ThisBuild / scalaVersion := Scala213 ThisBuild / crossScalaVersions := Seq(Scala213, Scala212) From f65944bc39f0941eedc0ec5123fac3e9ccd45459 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Fri, 8 Jan 2021 14:00:45 -0700 Subject: [PATCH 04/13] update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da1c13c5..b3ee2a26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.3, 2.12.12] - java: [openjdk@1.11-0] + java: [openjdk@1.11.0] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -87,7 +87,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.3] - java: [openjdk@1.11-0] + java: [openjdk@1.11.0] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) From 57530a4c4690476989bbc48dbaefa70957e81246 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Mon, 11 Jan 2021 16:11:50 -0700 Subject: [PATCH 05/13] sudo save us --- .github/workflows/ci.yml | 2 +- build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3ee2a26..0ce78fc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: - name: Setup run: | - make travis-install + sudo make travis-install make travis-run - name: Run tests diff --git a/build.sbt b/build.sbt index 33254c00..b41be5cf 100644 --- a/build.sbt +++ b/build.sbt @@ -170,7 +170,7 @@ ThisBuild / crossScalaVersions := Seq(Scala213, Scala212) ThisBuild / githubWorkflowJavaVersions := Seq(Jdk11) ThisBuild / githubWorkflowBuild := Seq( WorkflowStep.Sbt(List("scalafmtCheckAll"), name = Some("Check formatting")), - WorkflowStep.Run(List("make travis-install", "make travis-run"), name = Some("Setup")), + WorkflowStep.Run(List("sudo make travis-install", "make travis-run"), name = Some("Setup")), WorkflowStep.Sbt(List("test"), name = Some("Run tests")), WorkflowStep.Sbt(List("docs/mdoc"), name = Some("Compile Docs")) ) From 6db1aa4525bd8d95d579e90f127efc3bba03d45a Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Mon, 11 Jan 2021 16:22:42 -0700 Subject: [PATCH 06/13] sudo save us++ --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b41be5cf..bebccb67 100644 --- a/build.sbt +++ b/build.sbt @@ -170,7 +170,7 @@ ThisBuild / crossScalaVersions := Seq(Scala213, Scala212) ThisBuild / githubWorkflowJavaVersions := Seq(Jdk11) ThisBuild / githubWorkflowBuild := Seq( WorkflowStep.Sbt(List("scalafmtCheckAll"), name = Some("Check formatting")), - WorkflowStep.Run(List("sudo make travis-install", "make travis-run"), name = Some("Setup")), + WorkflowStep.Run(List("sudo make travis-install", "sudo make travis-run"), name = Some("Setup")), WorkflowStep.Sbt(List("test"), name = Some("Run tests")), WorkflowStep.Sbt(List("docs/mdoc"), name = Some("Compile Docs")) ) From 4115abf7108b01aceea95eec8899856c42cc1b8b Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Mon, 11 Jan 2021 16:24:00 -0700 Subject: [PATCH 07/13] regen ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ce78fc6..1bed5aa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: - name: Setup run: | sudo make travis-install - make travis-run + sudo make travis-run - name: Run tests run: sbt ++${{ matrix.scala }} test From 8cd89aa1b890648d4454a02f82812c8cbc0ac64d Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Mon, 11 Jan 2021 20:59:19 -0700 Subject: [PATCH 08/13] add docker-compose with support for redis and memcached --- .github/workflows/ci.yml | 10 ++++------ build.sbt | 6 +++--- docker-compose.yml | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 docker-compose.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bed5aa6..45135e98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,15 +56,13 @@ jobs: - name: Check that workflows are up to date run: sbt ++${{ matrix.scala }} githubWorkflowCheck - - name: Check formatting + - name: Check Formatting run: sbt ++${{ matrix.scala }} scalafmtCheckAll - - name: Setup - run: | - sudo make travis-install - sudo make travis-run + - name: Setup Dependencies + run: docker-compose up -d - - name: Run tests + - name: Run Tests run: sbt ++${{ matrix.scala }} test - name: Compile Docs diff --git a/build.sbt b/build.sbt index bebccb67..e1844f60 100644 --- a/build.sbt +++ b/build.sbt @@ -169,9 +169,9 @@ ThisBuild / scalaVersion := Scala213 ThisBuild / crossScalaVersions := Seq(Scala213, Scala212) ThisBuild / githubWorkflowJavaVersions := Seq(Jdk11) ThisBuild / githubWorkflowBuild := Seq( - WorkflowStep.Sbt(List("scalafmtCheckAll"), name = Some("Check formatting")), - WorkflowStep.Run(List("sudo make travis-install", "sudo make travis-run"), name = Some("Setup")), - WorkflowStep.Sbt(List("test"), name = Some("Run tests")), + WorkflowStep.Sbt(List("scalafmtCheckAll"), name = Some("Check Formatting")), + WorkflowStep.Run(List("docker-compose up -d"), name = Some("Setup Dependencies")), + WorkflowStep.Sbt(List("test"), name = Some("Run Tests")), WorkflowStep.Sbt(List("docs/mdoc"), name = Some("Compile Docs")) ) //sbt-ci-release settings diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..d3f9cf99 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3.8' +services: + redis-cluster: + image: grokzen/redis-cluster:latest + ports: + - '7000-7005:7000-7005' + - '6379:7006' + - '6380:7007' + environment: + IP: 0.0.0.0 + STANDALONE: 'true' + memcached: + image: memcached:latest + ports: + - '11211:11211' From d1199745f31cd8828c2b7e9e56d968ba21f60842 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Mon, 11 Jan 2021 21:08:25 -0700 Subject: [PATCH 09/13] update to compile benchmarks to avoid tar failing without target dir --- .github/workflows/ci.yml | 3 +++ build.sbt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45135e98..03c877a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,9 @@ jobs: - name: Compile Docs run: sbt ++${{ matrix.scala }} docs/mdoc + - name: Compile Benchmarks + run: sbt ++${{ matrix.scala }} benchmarks/compile + - name: Compress target directories run: tar cf targets.tar modules/benchmarks/target target modules/docs/target modules/tests/target modules/caffeine/target modules/memcached/target modules/circe/target modules/redis/target modules/core/target project/target diff --git a/build.sbt b/build.sbt index e1844f60..e78d77b0 100644 --- a/build.sbt +++ b/build.sbt @@ -172,7 +172,8 @@ ThisBuild / githubWorkflowBuild := Seq( WorkflowStep.Sbt(List("scalafmtCheckAll"), name = Some("Check Formatting")), WorkflowStep.Run(List("docker-compose up -d"), name = Some("Setup Dependencies")), WorkflowStep.Sbt(List("test"), name = Some("Run Tests")), - WorkflowStep.Sbt(List("docs/mdoc"), name = Some("Compile Docs")) + WorkflowStep.Sbt(List("docs/mdoc"), name = Some("Compile Docs")), + WorkflowStep.Sbt(List("benchmarks/compile"), name = Some("Compile Benchmarks")) ) //sbt-ci-release settings ThisBuild / githubWorkflowTargetTags ++= Seq("v*") From fb83e7fe467f74712e9f7192134b340833a1fcfb Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Mon, 11 Jan 2021 21:13:52 -0700 Subject: [PATCH 10/13] remove travis and makefile --- .travis.yml | 48 ---------------------- Makefile | 116 ---------------------------------------------------- 2 files changed, 164 deletions(-) delete mode 100644 .travis.yml delete mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 01e68d6f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -sudo: false -language: scala -scala: - - 2.13.1 - - 2.12.10 -jdk: - - openjdk11 -services: - - memcached - - redis -before_install: - - git fetch --tags -install: - - make travis-install -before_script: - - make travis-run - -script: - - sbt ++$TRAVIS_SCALA_VERSION coverage test - - sbt ++$TRAVIS_SCALA_VERSION coverageReport - -stages: - - name: test - - name: release - if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork -jobs: - include: - - stage: test - name: Check formatting - scala: 2.13.1 - script: sbt ++$TRAVIS_SCALA_VERSION scalafmtCheckAll scalafmtSbtCheck - - stage: test - name: Compile the docs - scala: 2.12.10 - script: sbt ++$TRAVIS_SCALA_VERSION docs/mdoc - - stage: release - scala: 2.13.1 - script: sbt ci-release -cache: - directories: - - $HOME/.sbt - - $HOME/.ivy2 - - $HOME/.cache/coursier -before_cache: - - find $HOME/.sbt -name "*.lock" -type f -delete -print - - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete -print -after_script: - - make stop diff --git a/Makefile b/Makefile deleted file mode 100644 index 9ffb2c6d..00000000 --- a/Makefile +++ /dev/null @@ -1,116 +0,0 @@ -PATH := ./redis-git/src:${PATH} - -# CLUSTER REDIS NODES -define REDIS_CLUSTER_NODE1_CONF -daemonize yes -port 7000 -cluster-node-timeout 50 -pidfile /tmp/redis_cluster_node1.pid -logfile /tmp/redis_cluster_node1.log -save "" -appendonly no -cluster-enabled yes -cluster-config-file /tmp/redis_cluster_node1.conf -endef - -define REDIS_CLUSTER_NODE2_CONF -daemonize yes -port 7001 -cluster-node-timeout 50 -pidfile /tmp/redis_cluster_node2.pid -logfile /tmp/redis_cluster_node2.log -save "" -appendonly no -cluster-enabled yes -cluster-config-file /tmp/redis_cluster_node2.conf -endef - -define REDIS_CLUSTER_NODE3_CONF -daemonize yes -port 7002 -cluster-node-timeout 50 -pidfile /tmp/redis_cluster_node3.pid -logfile /tmp/redis_cluster_node3.log -save "" -appendonly no -cluster-enabled yes -cluster-config-file /tmp/redis_cluster_node3.conf -endef - -define REDIS_CLUSTER_NODE4_CONF -daemonize yes -port 7003 -cluster-node-timeout 50 -pidfile /tmp/redis_cluster_node4.pid -logfile /tmp/redis_cluster_node4.log -save "" -appendonly no -cluster-enabled yes -cluster-config-file /tmp/redis_cluster_node4.conf -endef - -define REDIS_CLUSTER_NODE5_CONF -daemonize yes -port 7004 -cluster-node-timeout 5000 -pidfile /tmp/redis_cluster_node5.pid -logfile /tmp/redis_cluster_node5.log -save "" -appendonly no -cluster-enabled yes -cluster-config-file /tmp/redis_cluster_node5.conf -endef - -define REDIS_CLUSTER_NODE6_CONF -daemonize yes -port 7005 -cluster-node-timeout 5000 -pidfile /tmp/redis_cluster_node6.pid -logfile /tmp/redis_cluster_node6.log -save "" -appendonly no -cluster-enabled yes -cluster-config-file /tmp/redis_cluster_node6.conf -endef - -export REDIS_CLUSTER_NODE1_CONF -export REDIS_CLUSTER_NODE2_CONF -export REDIS_CLUSTER_NODE3_CONF -export REDIS_CLUSTER_NODE4_CONF -export REDIS_CLUSTER_NODE5_CONF -export REDIS_CLUSTER_NODE6_CONF - - -start: cleanup - echo "$$REDIS_CLUSTER_NODE1_CONF" | redis-server - - echo "$$REDIS_CLUSTER_NODE2_CONF" | redis-server - - echo "$$REDIS_CLUSTER_NODE3_CONF" | redis-server - - echo "$$REDIS_CLUSTER_NODE4_CONF" | redis-server - - echo "$$REDIS_CLUSTER_NODE5_CONF" | redis-server - - echo "$$REDIS_CLUSTER_NODE6_CONF" | redis-server - - -cleanup: - - rm -vf /tmp/redis_cluster_node*.conf 2>/dev/null - - rm dump.rdb appendonly.aof - 2>/dev/null - -stop: - kill `cat /tmp/redis_cluster_node1.pid` || true - kill `cat /tmp/redis_cluster_node2.pid` || true - kill `cat /tmp/redis_cluster_node3.pid` || true - kill `cat /tmp/redis_cluster_node4.pid` || true - kill `cat /tmp/redis_cluster_node5.pid` || true - kill `cat /tmp/redis_cluster_node6.pid` || true - rm -f /tmp/redis_cluster_node1.conf - rm -f /tmp/redis_cluster_node2.conf - rm -f /tmp/redis_cluster_node3.conf - rm -f /tmp/redis_cluster_node4.conf - rm -f /tmp/redis_cluster_node5.conf - rm -f /tmp/redis_cluster_node6.conf - -travis-run: - make start - echo yes | ruby ./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 - -travis-install: - wget https://raw.githubusercontent.com/antirez/redis/4.0.6/src/redis-trib.rb -O redis-trib.rb - gem install redis From fa383d9c071d7c93569f301a5ee6fd6cb461cca3 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Fri, 15 Jan 2021 22:58:53 -0700 Subject: [PATCH 11/13] update mergify and status badges --- .mergify.yml | 4 ++-- README.md | 2 +- modules/docs/src/main/mdoc/index.md | 2 +- project/plugins.sbt | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index dc7a042e..a0f0a0a0 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -3,7 +3,7 @@ pull_request_rules: conditions: - author=scala-steward - body~=labels:.*semver-patch - - status-success=continuous-integration/travis-ci/pr + - status-success~=Build and Test actions: merge: method: merge @@ -11,7 +11,7 @@ pull_request_rules: conditions: - author=scala-steward - body~=labels:.*semver-minor - - status-success=continuous-integration/travis-ci/pr + - status-success~=Build and Test - "#approved-reviews-by>=1" actions: merge: diff --git a/README.md b/README.md index 2333f0c0..d699f936 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Join the chat at https://gitter.im/cb372/scalacache](https://badges.gitter.im/cb372/scalacache.svg)](https://gitter.im/cb372/scalacache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://travis-ci.org/cb372/scalacache.png?branch=master)](https://travis-ci.org/cb372/scalacache) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) +[![Build Status](https://github.com/cb372/scalacache/workflows/ci/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) A facade for the most popular cache implementations, with a simple, idiomatic Scala API. diff --git a/modules/docs/src/main/mdoc/index.md b/modules/docs/src/main/mdoc/index.md index 36d34944..d6dee5db 100644 --- a/modules/docs/src/main/mdoc/index.md +++ b/modules/docs/src/main/mdoc/index.md @@ -5,7 +5,7 @@ technologies: - first: ["Scala", "As the name implies ScalaCache is written in Scala."] --- -[![Build Status](https://travis-ci.org/cb372/scalacache.png?branch=master)](https://travis-ci.org/cb372/scalacache) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) +[![Build Status](https://github.com/cb372/scalacache/workflows/ci/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) A facade for the most popular cache implementations, with a simple, idiomatic Scala API. diff --git a/project/plugins.sbt b/project/plugins.sbt index 54b0e1fa..9c3a8511 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,6 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.47deg" % "sbt-microsites" % "1.1.5") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.14") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.9.5") From 91a203020ecebe1513b6dd073e273dbaf0d19a09 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Fri, 15 Jan 2021 23:06:25 -0700 Subject: [PATCH 12/13] update gh status badge workflow name --- README.md | 2 +- modules/docs/src/main/mdoc/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d699f936..368dcb6a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Join the chat at https://gitter.im/cb372/scalacache](https://badges.gitter.im/cb372/scalacache.svg)](https://gitter.im/cb372/scalacache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://github.com/cb372/scalacache/workflows/ci/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) +[![Build Status](https://github.com/cb372/scalacache/workflows/Continuous%20Integration/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) A facade for the most popular cache implementations, with a simple, idiomatic Scala API. diff --git a/modules/docs/src/main/mdoc/index.md b/modules/docs/src/main/mdoc/index.md index d6dee5db..0dc59828 100644 --- a/modules/docs/src/main/mdoc/index.md +++ b/modules/docs/src/main/mdoc/index.md @@ -5,7 +5,7 @@ technologies: - first: ["Scala", "As the name implies ScalaCache is written in Scala."] --- -[![Build Status](https://github.com/cb372/scalacache/workflows/ci/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) +[![Build Status](https://github.com/cb372/scalacache/workflows/Continuous%20Integration/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) A facade for the most popular cache implementations, with a simple, idiomatic Scala API. From a2bd732c4a38ae48f9574e302943b899d1c28e3e Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Fri, 15 Jan 2021 23:08:43 -0700 Subject: [PATCH 13/13] gh status badge again :face-palm: --- README.md | 2 +- modules/docs/src/main/mdoc/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 368dcb6a..bb2e1614 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Join the chat at https://gitter.im/cb372/scalacache](https://badges.gitter.im/cb372/scalacache.svg)](https://gitter.im/cb372/scalacache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://github.com/cb372/scalacache/workflows/Continuous%20Integration/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) +[![Build Status](https://github.com/cb372/scalacache/workflows/Continuous%20Integration/badge.svg)](https://github.com/cb372/scalacache/actions) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) A facade for the most popular cache implementations, with a simple, idiomatic Scala API. diff --git a/modules/docs/src/main/mdoc/index.md b/modules/docs/src/main/mdoc/index.md index 0dc59828..86c72116 100644 --- a/modules/docs/src/main/mdoc/index.md +++ b/modules/docs/src/main/mdoc/index.md @@ -5,7 +5,7 @@ technologies: - first: ["Scala", "As the name implies ScalaCache is written in Scala."] --- -[![Build Status](https://github.com/cb372/scalacache/workflows/Continuous%20Integration/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) +[![Build Status](https://github.com/cb372/scalacache/workflows/Continuous%20Integration/badge.svg)](https://github.com/cb372/scalacache/actions) [![Maven Central](https://img.shields.io/maven-central/v/com.github.cb372/scalacache-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cscalacache) A facade for the most popular cache implementations, with a simple, idiomatic Scala API.