From 573be120e4595be34032c627bbdaf3defc1be0d3 Mon Sep 17 00:00:00 2001 From: Toshiyuki Takahashi Date: Thu, 25 Apr 2024 15:00:59 +0900 Subject: [PATCH] Set up CI to support multiple flyway versions --- .github/workflows/scala.yml | 12 ++++++++++-- build.sbt | 4 +++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 8a90b20..f754572 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -11,12 +11,20 @@ jobs: runs-on: ubuntu-latest + strategy: + matrix: + flyway-version: + - "9.16.0" + - "9.22.0" + java-version: + - "11" + steps: - uses: actions/checkout@v4 - name: Set up JDK uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: ${{ matrix.java-version }} - name: Run tests - run: sbt +test + run: FLYWAY_PLAY_FLYWAY_VERSION=${{ matrix.flyway-version }} sbt +test diff --git a/build.sbt b/build.sbt index 7766768..5cceacb 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,9 @@ val flywayPlayVersion = "9.0.0" val scalaVersion_2_13 = "2.13.13" val scalaVersion_3 = "3.3.3" -val flywayVersion = "9.16.3" +val defaultFlywayVersion = "9.16.3" +val flywayVersion = sys.env.getOrElse("FLYWAY_PLAY_FLYWAY_VERSION", defaultFlywayVersion) + val scalikejdbcVersion = "4.2.1" val scalatest = "org.scalatest" %% "scalatest" % "3.2.18" % "test"