diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d53a7706311..6f9d8f5c873 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,60 @@ "run": "csbt docs/docusaurusCreateSite" } ] + }, + "Metals": { + "runs-on": "ubuntu-latest", + "steps": [ + { + "uses": "actions/checkout@v1" + }, + { + "uses": "olafurpg/setup-scala@v2" + }, + { + "name": "Run tests", + "run": "csbt 'unit/testOnly -- tests.${{ matrix.test }}'" + } + ], + "strategy": { + "fail-fast": false, + "matrix": { + "test": [ + "{foldingrange,filewatch,hover,metals,references,statusbar,completions}", + "{ansi,workspacesymbol,bsp,builds,applyedit,compile,definition}", + "{http,formatting,documentsymbol,documenthighlight,codelens,tvp,mtags}" + ] + } + } + }, + "Mtags": { + "runs-on": "ubuntu-latest", + "steps": [ + { + "uses": "actions/checkout@v1" + }, + { + "uses": "olafurpg/setup-scala@v2" + }, + { + "name": "Run tests", + "run": "csbt ++${{ matrix.scala }} cross/test" + } + ], + "strategy": { + "fail-fast": false, + "matrix": { + "scala": [ + "2.13.0", + "2.13.1", + "2.12.8", + "2.12.9", + "2.12.10", + "2.12.7", + "2.11.12" + ] + } + } } } } \ No newline at end of file diff --git a/build.sbt b/build.sbt index ffe85de4b05..c4212ef7b35 100644 --- a/build.sbt +++ b/build.sbt @@ -113,9 +113,8 @@ inThisBuild( .filter(_.isDirectory) .map(_.toPath.getFileName.toString) .grouped(7) - .map { group => - group.mkString("{", ",", "}") - } + .map(_.mkString("{", ",", "}")) + .toSeq def job(name: String, run: String, matrix: Obj = Obj()): Obj = { val result = Obj( "runs-on" -> "ubuntu-latest", @@ -138,21 +137,27 @@ inThisBuild( "name" -> Str("CI"), "on" -> Arr(Str("push"), Str("pull_request")), "jobs" -> Obj( - "Scalafmt" -> job("Formatting", "./bin/scalafmt --test"), + "Scalafmt" -> job( + "Formatting", + "./bin/scalafmt --test" + ), "Scalafix" -> job( "Linting", "csbt scalafixCheck githubActionsCheck" ), - "Docusaurus" -> job("Website", "csbt docs/docusaurusCreateSite"), - "UnitTest" -> job( + "Docusaurus" -> job( + "Website", + "csbt docs/docusaurusCreateSite" + ), + "Metals" -> job( "Run tests", "csbt 'unit/testOnly -- tests.${{ matrix.test }}'", - matrix("test" -> tests) + matrix("test", tests) ), - "PresentationCompiler" -> job( + "Mtags" -> job( "Run tests", "csbt ++${{ matrix.scala }} cross/test", - matrix("scala" -> V.supportedScalaVersions) + matrix("scala", V.supportedScalaVersions) ) ) )