diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e59b5c4f26..9e8048af61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,19 +9,20 @@ jobs: ci: # Run on external PRs, but not on internal PRs since those will be run by push to branch # For JVM 3 GB is the lowest value we can set without causing failures in tests - # For JS tests 2.5 GB is the lowest value we can set without causing failures in tests + # For JS tests 2.5 GB is the lowest value we can set without causing failures in tests, + # however they are split into tests for 2.11+2.12 and 2.13+3 so that there are no timeouts. # For Native we probably can lower the value further if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: - target-platform: [ "JVM", "JS", "Native" ] + target-platform: [ "JVM", "JS1", "JS2", "Native" ] steps: - name: Set Java Opts for JS - if: matrix.target-platform == 'JS' + if: startsWith(matrix.target-platform, 'JS') run: | - echo "JAVA_OPTS=-Xmx3500M -Dsbt.task.timings=true" >> $GITHUB_ENV + echo "JAVA_OPTS=-Xmx2500M -Dsbt.task.timings=true" >> $GITHUB_ENV - name: Set Java Opts for JVM if: matrix.target-platform == 'JVM' run: | diff --git a/build.sbt b/build.sbt index b8f8b2faf9..25b7e280e2 100644 --- a/build.sbt +++ b/build.sbt @@ -233,7 +233,8 @@ lazy val allAggregates = projectsWithOptionalNative ++ // For CI tests, defining scripts that run JVM/JS/Native tests separately val testJVM = taskKey[Unit]("Test JVM projects") -val testJS = taskKey[Unit]("Test JS projects") +val testJS1 = taskKey[Unit]("Test JS 2.11 and 2.12 projects") +val testJS2 = taskKey[Unit]("Test JS 2.13 and 3 projects") val testNative = taskKey[Unit]("Test native projects") def filterProject(p: String => Boolean) = @@ -245,7 +246,12 @@ lazy val rootProject = (project in file(".")) publish / skip := true, name := "sttp", testJVM := (Test / test).all(filterProject(p => !p.contains("JS") && !p.contains("Native"))).value, - testJS := (Test / test).all(filterProject(_.contains("JS"))).value, + testJS1 := (Test / test) + .all(filterProject(p => p.contains("JS") && (p.contains("2_11") || p.contains("2_12")))) + .value, + testJS2 := (Test / test) + .all(filterProject(p => p.contains("JS") && !p.contains("2_11") && !p.contains("2_12"))) + .value, testNative := (Test / test).all(filterProject(_.contains("Native"))).value, ideSkipProject := false, scalaVersion := scala2_13