From 68d532ed96a3acdac850e11e690b5227b3fb948c Mon Sep 17 00:00:00 2001 From: Julien Jean Paul Sirocchi Date: Fri, 3 Jan 2025 14:52:49 -0800 Subject: [PATCH] adding mergify and bumping plugin --- .github/workflows/ci.yml | 32 ++++++++++++++++---------------- .mergify.yml | 40 ++++++++++++++++++++-------------------- build.sbt | 2 ++ project/plugins.sbt | 3 ++- 4 files changed, 40 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89f084ef..f7e6dc67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,10 +24,10 @@ concurrency: jobs: build: - name: Build and Test + name: Test strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-22.04] scala: [2.12, 2.13] java: [temurin@11, temurin@17, temurin@21] project: [laserdiscJVM, laserdiscJS] @@ -43,14 +43,14 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: - - name: Install sbt - uses: sbt/setup-sbt@v1 - - name: Checkout current branch (full) uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Setup Java (temurin@11) id: setup-java-temurin-11 if: matrix.java == 'temurin@11' @@ -103,7 +103,7 @@ jobs: run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: scalaJSLink @@ -114,11 +114,11 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc - name: Make target directories @@ -142,18 +142,18 @@ jobs: if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-22.04] java: [temurin@11] runs-on: ${{ matrix.os }} steps: - - name: Install sbt - uses: sbt/setup-sbt@v1 - - name: Checkout current branch (full) uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Setup Java (temurin@11) id: setup-java-temurin-11 if: matrix.java == 'temurin@11' @@ -262,18 +262,18 @@ jobs: if: github.event.repository.fork == false && github.event_name != 'pull_request' strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-22.04] java: [temurin@11] runs-on: ${{ matrix.os }} steps: - - name: Install sbt - uses: sbt/setup-sbt@v1 - - name: Checkout current branch (full) uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Setup Java (temurin@11) id: setup-java-temurin-11 if: matrix.java == 'temurin@11' diff --git a/.mergify.yml b/.mergify.yml index 495bdf04..e0d1e46d 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,21 +1,21 @@ +# This file was automatically generated by sbt-typelevel-mergify using the +# mergifyGenerate 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 mergify configuration +# to meet your needs, then regenerate this file. + pull_request_rules: - - name: assign and label scala-steward's PRs - conditions: - - author=scala-steward - actions: - assign: - users: [sirocchj] - label: - add: [dependency-update] - - name: merge scala-steward's PRs - conditions: - - author=scala-steward - - status-success=Format - - status-success=Compile benchmarks - - status-success=Test (2.12.18, openjdk@1.11, ubuntu-22.04) - - status-success=Test (2.12.18, openjdk@1.17, ubuntu-22.04) - - status-success=Test (2.13.11, openjdk@1.11, ubuntu-22.04) - - status-success=Test (2.13.11, openjdk@1.17, ubuntu-22.04) - actions: - merge: - method: squash +- name: merge scala-steward's PRs + conditions: + - author=scala-steward + - body~=labels:.*early-semver-patch + - status-success=Test (ubuntu-22.04, 2.12, temurin@11, laserdiscJVM) + - status-success=Test (ubuntu-22.04, 2.12, temurin@11, laserdiscJS) + - status-success=Test (ubuntu-22.04, 2.13, temurin@11, laserdiscJVM) + - status-success=Test (ubuntu-22.04, 2.13, temurin@11, laserdiscJS) + - status-success=Test (ubuntu-22.04, 2.13, temurin@17, laserdiscJVM) + - status-success=Test (ubuntu-22.04, 2.13, temurin@21, laserdiscJVM) + actions: + merge: + method: squash diff --git a/build.sbt b/build.sbt index 72bf6c5c..c0a7aa38 100644 --- a/build.sbt +++ b/build.sbt @@ -160,6 +160,8 @@ ThisBuild / githubWorkflowBuildPreamble ++= Seq( name = Some("Start up Valkey") ) ) +ThisBuild / mergifyLabelPaths := Map.empty +ThisBuild / mergifyStewardConfig := Some(MergifyStewardConfig(action = MergifyAction.Merge(Some("squash")))) lazy val commonSettings = Seq( coverageEnabled := false, diff --git a/project/plugins.sbt b/project/plugins.sbt index ecd78879..5b89674b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,6 +2,7 @@ addSbtPlugin("com.github.sbt" % "sbt-boilerplate" % "0.7.0") addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.4") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.5") +addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.7.5") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")