From b2a2f51e343e1125b53396801f65df88b27fce49 Mon Sep 17 00:00:00 2001 From: James Earl Douglas Date: Sun, 27 Nov 2022 19:18:45 -0700 Subject: [PATCH] Split out individual CI builds for each example (#713) --- .github/workflows/build.yml | 2 +- .../{examples.yml => examples-adder.yml} | 11 ++++------ .github/workflows/examples-async.yml | 21 +++++++++++++++++++ .github/workflows/examples-free.yml | 21 +++++++++++++++++++ .github/workflows/examples-frege.yml | 21 +++++++++++++++++++ .../workflows/examples-getting-started.yml | 21 +++++++++++++++++++ .github/workflows/examples-http4s.yml | 21 +++++++++++++++++++ .github/workflows/examples-https.yml | 21 +++++++++++++++++++ .github/workflows/examples-lift.yml | 21 +++++++++++++++++++ .github/workflows/examples-mustache.yml | 21 +++++++++++++++++++ .github/workflows/examples-payara-micro.yml | 21 +++++++++++++++++++ .github/workflows/examples-sbt-0.13.yml | 21 +++++++++++++++++++ .github/workflows/examples-sbt-1.3.yml | 21 +++++++++++++++++++ .github/workflows/examples-scala-js.yml | 21 +++++++++++++++++++ .github/workflows/examples-scalatra.yml | 21 +++++++++++++++++++ .github/workflows/examples-spray.yml | 21 +++++++++++++++++++ .github/workflows/examples-zio.yml | 21 +++++++++++++++++++ examples/adder/build.sbt | 2 -- examples/async/build.sbt | 2 -- examples/free/build.sbt | 2 -- examples/frege/build.sbt | 2 -- examples/getting-started/build.sbt | 2 -- examples/http4s/build.sbt | 2 -- examples/https/build.sbt | 2 -- examples/lift/build.sbt | 2 -- examples/mustache/build.sbt | 2 -- examples/payara-micro/build.sbt | 2 -- examples/sbt-0.13/build.sbt | 2 -- examples/sbt-1.3/build.sbt | 2 -- examples/scala-js/build.sbt | 5 ----- examples/scalatra/build.sbt | 2 -- examples/spray/build.sbt | 2 -- examples/zio/build.sbt | 2 -- 33 files changed, 320 insertions(+), 43 deletions(-) rename .github/workflows/{examples.yml => examples-adder.yml} (62%) create mode 100644 .github/workflows/examples-async.yml create mode 100644 .github/workflows/examples-free.yml create mode 100644 .github/workflows/examples-frege.yml create mode 100644 .github/workflows/examples-getting-started.yml create mode 100644 .github/workflows/examples-http4s.yml create mode 100644 .github/workflows/examples-https.yml create mode 100644 .github/workflows/examples-lift.yml create mode 100644 .github/workflows/examples-mustache.yml create mode 100644 .github/workflows/examples-payara-micro.yml create mode 100644 .github/workflows/examples-sbt-0.13.yml create mode 100644 .github/workflows/examples-sbt-1.3.yml create mode 100644 .github/workflows/examples-scala-js.yml create mode 100644 .github/workflows/examples-scalatra.yml create mode 100644 .github/workflows/examples-spray.yml create mode 100644 .github/workflows/examples-zio.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07d617ab..57f9b9f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: paths-ignore: - 'examples/**' - - '.github/workflows/examples.yml' + - '.github/workflows/examples-*.yml' jobs: build: diff --git a/.github/workflows/examples.yml b/.github/workflows/examples-adder.yml similarity index 62% rename from .github/workflows/examples.yml rename to .github/workflows/examples-adder.yml index ca4ad549..a5b24651 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples-adder.yml @@ -3,7 +3,8 @@ name: examples on: push: paths: - - 'examples/**' + - '.github/workflows/examples-adder.yml' + - 'examples/adder/**' jobs: build: @@ -16,9 +17,5 @@ jobs: with: java-version: 8 - run: | - for i in examples/* - do - pushd $i - sbt test - popd - done + cd examples/adder + sbt Jetty/test diff --git a/.github/workflows/examples-async.yml b/.github/workflows/examples-async.yml new file mode 100644 index 00000000..9e65990f --- /dev/null +++ b/.github/workflows/examples-async.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-async.yml' + - 'examples/async/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/async + sbt Jetty/test diff --git a/.github/workflows/examples-free.yml b/.github/workflows/examples-free.yml new file mode 100644 index 00000000..27ddf99f --- /dev/null +++ b/.github/workflows/examples-free.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-free.yml' + - 'examples/free/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/free + sbt Jetty/test diff --git a/.github/workflows/examples-frege.yml b/.github/workflows/examples-frege.yml new file mode 100644 index 00000000..3818bec8 --- /dev/null +++ b/.github/workflows/examples-frege.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-frege.yml' + - 'examples/frege/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/frege + sbt Jetty/test diff --git a/.github/workflows/examples-getting-started.yml b/.github/workflows/examples-getting-started.yml new file mode 100644 index 00000000..94f1b92b --- /dev/null +++ b/.github/workflows/examples-getting-started.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-getting-started.yml' + - 'examples/getting-started/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/getting-started + sbt Jetty/test diff --git a/.github/workflows/examples-http4s.yml b/.github/workflows/examples-http4s.yml new file mode 100644 index 00000000..558ace7b --- /dev/null +++ b/.github/workflows/examples-http4s.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-http4s.yml' + - 'examples/http4s/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/http4s + sbt Jetty/test diff --git a/.github/workflows/examples-https.yml b/.github/workflows/examples-https.yml new file mode 100644 index 00000000..032bbe3f --- /dev/null +++ b/.github/workflows/examples-https.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-https.yml' + - 'examples/https/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/https + sbt Tomcat/test diff --git a/.github/workflows/examples-lift.yml b/.github/workflows/examples-lift.yml new file mode 100644 index 00000000..c73f2eb0 --- /dev/null +++ b/.github/workflows/examples-lift.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-lift.yml' + - 'examples/lift/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/lift + sbt Jetty/test diff --git a/.github/workflows/examples-mustache.yml b/.github/workflows/examples-mustache.yml new file mode 100644 index 00000000..407b477d --- /dev/null +++ b/.github/workflows/examples-mustache.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-mustache.yml' + - 'examples/mustache/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/mustache + sbt Jetty/test diff --git a/.github/workflows/examples-payara-micro.yml b/.github/workflows/examples-payara-micro.yml new file mode 100644 index 00000000..4c3f35d0 --- /dev/null +++ b/.github/workflows/examples-payara-micro.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-payara-micro.yml' + - 'examples/payara-micro/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/payara-micro + sbt Container/test diff --git a/.github/workflows/examples-sbt-0.13.yml b/.github/workflows/examples-sbt-0.13.yml new file mode 100644 index 00000000..6f71ee73 --- /dev/null +++ b/.github/workflows/examples-sbt-0.13.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-sbt-0.13.yml' + - 'examples/sbt-0.13/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/sbt-0.13 + sbt jetty:test diff --git a/.github/workflows/examples-sbt-1.3.yml b/.github/workflows/examples-sbt-1.3.yml new file mode 100644 index 00000000..ab3b06f5 --- /dev/null +++ b/.github/workflows/examples-sbt-1.3.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-sbt-1.3.yml' + - 'examples/sbt-1.3/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/sbt-1.3 + sbt Jetty/test diff --git a/.github/workflows/examples-scala-js.yml b/.github/workflows/examples-scala-js.yml new file mode 100644 index 00000000..5d5a9674 --- /dev/null +++ b/.github/workflows/examples-scala-js.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-scala-js.yml' + - 'examples/scala-js/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/scala-js + sbt fastOptJS Jetty/test diff --git a/.github/workflows/examples-scalatra.yml b/.github/workflows/examples-scalatra.yml new file mode 100644 index 00000000..33da6b6c --- /dev/null +++ b/.github/workflows/examples-scalatra.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-scalatra.yml' + - 'examples/scalatra/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/scalatra + sbt Jetty/test diff --git a/.github/workflows/examples-spray.yml b/.github/workflows/examples-spray.yml new file mode 100644 index 00000000..db9ad1c5 --- /dev/null +++ b/.github/workflows/examples-spray.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-spray.yml' + - 'examples/spray/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/spray + sbt Jetty/test diff --git a/.github/workflows/examples-zio.yml b/.github/workflows/examples-zio.yml new file mode 100644 index 00000000..0ab93927 --- /dev/null +++ b/.github/workflows/examples-zio.yml @@ -0,0 +1,21 @@ +name: examples + +on: + push: + paths: + - '.github/workflows/examples-zio.yml' + - 'examples/zio/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd examples/zio + sbt Jetty/test diff --git a/examples/adder/build.sbt b/examples/adder/build.sbt index 865fe5cd..27ceac7a 100644 --- a/examples/adder/build.sbt +++ b/examples/adder/build.sbt @@ -13,5 +13,3 @@ containerForkOptions := "DB_PASS" -> "" ) ) - -test := (Jetty / test).value diff --git a/examples/async/build.sbt b/examples/async/build.sbt index 9301e601..391c1b90 100644 --- a/examples/async/build.sbt +++ b/examples/async/build.sbt @@ -2,5 +2,3 @@ libraryDependencies += "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provid libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.4" % "test" enablePlugins(JettyPlugin) - -test := (Jetty / test).value diff --git a/examples/free/build.sbt b/examples/free/build.sbt index ef8c51f2..3f027507 100644 --- a/examples/free/build.sbt +++ b/examples/free/build.sbt @@ -23,5 +23,3 @@ enablePlugins(JettyPlugin) addCompilerPlugin( "org.typelevel" %% "kind-projector" % "0.11.3" cross CrossVersion.full ) - -test := (Jetty / test).value diff --git a/examples/frege/build.sbt b/examples/frege/build.sbt index bc425202..07d1cef6 100644 --- a/examples/frege/build.sbt +++ b/examples/frege/build.sbt @@ -4,5 +4,3 @@ javacOptions ++= Seq("-encoding", "UTF-8") libraryDependencies += "javax.servlet" % "javax.servlet-api" % "4.0.1" % "provided" libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.9" % "test" - -test := (Jetty / test).value diff --git a/examples/getting-started/build.sbt b/examples/getting-started/build.sbt index 7fb01d5e..7f2984f7 100644 --- a/examples/getting-started/build.sbt +++ b/examples/getting-started/build.sbt @@ -1,5 +1,3 @@ libraryDependencies += "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided" libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.4" % "test" enablePlugins(JettyPlugin) - -test := (Jetty / test).value diff --git a/examples/http4s/build.sbt b/examples/http4s/build.sbt index 3182b9e3..d72bb732 100644 --- a/examples/http4s/build.sbt +++ b/examples/http4s/build.sbt @@ -6,5 +6,3 @@ libraryDependencies += "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provid libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.4" % "test" enablePlugins(JettyPlugin) - -test := (Jetty / test).value diff --git a/examples/https/build.sbt b/examples/https/build.sbt index 7d3ea915..0c55c928 100644 --- a/examples/https/build.sbt +++ b/examples/https/build.sbt @@ -15,5 +15,3 @@ Tomcat / javaOptions ++= Seq( ) containerPort := 8443 - -test := (Tomcat / test).value diff --git a/examples/lift/build.sbt b/examples/lift/build.sbt index b28556c3..cfe7b9e5 100644 --- a/examples/lift/build.sbt +++ b/examples/lift/build.sbt @@ -3,5 +3,3 @@ libraryDependencies += "net.liftweb" %% "lift-webkit" % "3.5.0" libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.9" % "test" enablePlugins(JettyPlugin) - -test := (Jetty / test).value diff --git a/examples/mustache/build.sbt b/examples/mustache/build.sbt index af8e7a8b..42c63d68 100644 --- a/examples/mustache/build.sbt +++ b/examples/mustache/build.sbt @@ -6,5 +6,3 @@ libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.9" % "test" enablePlugins(JettyPlugin) webappWebInfClasses := true - -test := (Jetty / test).value diff --git a/examples/payara-micro/build.sbt b/examples/payara-micro/build.sbt index 40493458..f33924c6 100644 --- a/examples/payara-micro/build.sbt +++ b/examples/payara-micro/build.sbt @@ -15,5 +15,3 @@ containerLaunchCmd in Container := { (port, path) => "/" ) } - -test := (Container / test).value diff --git a/examples/sbt-0.13/build.sbt b/examples/sbt-0.13/build.sbt index 29a1c688..09d9ec84 100644 --- a/examples/sbt-0.13/build.sbt +++ b/examples/sbt-0.13/build.sbt @@ -5,5 +5,3 @@ libraryDependencies += "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provid libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test" enablePlugins(JettyPlugin) - -test := (test in Jetty).value diff --git a/examples/sbt-1.3/build.sbt b/examples/sbt-1.3/build.sbt index daca1c0c..ba88eed2 100644 --- a/examples/sbt-1.3/build.sbt +++ b/examples/sbt-1.3/build.sbt @@ -4,5 +4,3 @@ libraryDependencies += "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provid libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test" enablePlugins(JettyPlugin) - -test := (Jetty / test).value diff --git a/examples/scala-js/build.sbt b/examples/scala-js/build.sbt index 2d3ff362..f78dcb20 100644 --- a/examples/scala-js/build.sbt +++ b/examples/scala-js/build.sbt @@ -6,8 +6,3 @@ enablePlugins(JettyPlugin) enablePlugins(ScalaJSPlugin) scalaJSUseMainModuleInitializer := true - -test := { - (Compile / fastOptJS).value - (Jetty / test).value -} diff --git a/examples/scalatra/build.sbt b/examples/scalatra/build.sbt index c9249443..12d392f3 100644 --- a/examples/scalatra/build.sbt +++ b/examples/scalatra/build.sbt @@ -5,5 +5,3 @@ libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.4" % "test" enablePlugins(JettyPlugin) Test / fork := true - -test := (Jetty / test).value diff --git a/examples/spray/build.sbt b/examples/spray/build.sbt index 0cbd215e..a6d726ab 100644 --- a/examples/spray/build.sbt +++ b/examples/spray/build.sbt @@ -6,5 +6,3 @@ libraryDependencies += "javax.servlet" % "javax.servlet-api" % "4.0.1" % "provid libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.9" % "test" enablePlugins(JettyPlugin) - -test := (Jetty / test).value diff --git a/examples/zio/build.sbt b/examples/zio/build.sbt index 6469fbbe..1c1e3013 100644 --- a/examples/zio/build.sbt +++ b/examples/zio/build.sbt @@ -15,5 +15,3 @@ containerForkOptions := "DB_PASS" -> "" ) } - -test := (Jetty / test).value