Skip to content

Commit

Permalink
Add remaining tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Olafur Pall Geirsson committed Sep 24, 2019
1 parent 83649c4 commit 0ec502f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 9 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
}
}
}
23 changes: 14 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
)
)
)
Expand Down

0 comments on commit 0ec502f

Please sign in to comment.