Skip to content

Commit

Permalink
Split js tests into 2.11+2.12 and 2.13+3
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Aug 11, 2022
1 parent fb5ddf8 commit 321b36d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand All @@ -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
Expand Down

0 comments on commit 321b36d

Please sign in to comment.