From 47c6cddc380c436bea4fb63ba952b9ee1a739134 Mon Sep 17 00:00:00 2001 From: harry0000 Date: Mon, 10 Jun 2024 19:17:32 +0900 Subject: [PATCH 1/3] Update CI settings --- .github/workflows/ci.yaml | 55 +++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4787848..ad9092c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,42 +1,53 @@ name: CI + on: pull_request: + branches: + - '**' push: + branches: + - main + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: + lint: + runs-on: ubuntu-latest + env: + # define Java options for both official sbt and sbt-extras + JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 + JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + - name: 'Run Scalafmt' + run: sbt -v ++3.4.1 scalafmtSbt scalafmtAll test: strategy: fail-fast: false matrix: - name: [ "test" ] scala: [ 3.3.0, 3.4.1 ] java: [ 20, 21 ] - include: - - name: "format" - scala: 3.4.1 - java: 21 exclude: - - name: "test" - scala: 3.3.0 + - scala: 3.3.0 java: 21 runs-on: ubuntu-latest + env: + # define Java options for both official sbt and sbt-extras + JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 + JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: ${{ matrix.java }} cache: sbt - - shell: bash - run: | - case ${{ matrix.name }} in - "format") - sbt -v ++${{ matrix.scala }} scalafmtSbt scalafmtAll - git diff --exit-code - ;; - "test") - sbt -v ++${{ matrix.scala }} test - ;; - *) - echo "unknown job" - exit 1 - esac + - name: 'Run tests' + run: sbt -v ++${{ matrix.scala }} test From da4b8a0856decb13844c0876e453e8951e1b757a Mon Sep 17 00:00:00 2001 From: harry0000 Date: Mon, 10 Jun 2024 19:19:55 +0900 Subject: [PATCH 2/3] Upgrade to Scala 3.4.2 --- .github/workflows/ci.yaml | 4 ++-- build.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ad9092c..86e7b66 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,12 +27,12 @@ jobs: java-version: 21 cache: sbt - name: 'Run Scalafmt' - run: sbt -v ++3.4.1 scalafmtSbt scalafmtAll + run: sbt -v ++3.4.2 scalafmtSbt scalafmtAll test: strategy: fail-fast: false matrix: - scala: [ 3.3.0, 3.4.1 ] + scala: [ 3.3.0, 3.4.2 ] java: [ 20, 21 ] exclude: - scala: 3.3.0 diff --git a/build.sbt b/build.sbt index fd8e989..810c929 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -lazy val supportedScalaVersions = List("3.4.1", "3.3.0") +lazy val supportedScalaVersions = List("3.4.2", "3.3.0") lazy val root = project .in(file(".")) From f400e5209052e51ebc8ee04af815a5c74d514475 Mon Sep 17 00:00:00 2001 From: harry0000 Date: Mon, 10 Jun 2024 19:22:04 +0900 Subject: [PATCH 3/3] Update munit version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 810c929..a68ac76 100644 --- a/build.sbt +++ b/build.sbt @@ -16,6 +16,6 @@ lazy val root = project "-unchecked", "-Wunused:all" ), - libraryDependencies += "org.scalameta" %% "munit" % "1.0.0-M11" % Test, + libraryDependencies += "org.scalameta" %% "munit" % "1.0.0" % Test, Test / parallelExecution := false )