Skip to content

Enabled CI on Windows and applied some fixes #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'windows-latest' ]
java: [ '8', '11' ]
scala: [
{ version: '2.11.12' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object Serializer {
|# - description (can be multi-line)
|# '\f' sign
|# ------------------------------------------
|""".stripMargin)
|""".stripMargin.replaceAll("(\r\n)|\n|\r", "\n"))
}

def writeStatement(stmt: Statement, writer: Writer): Unit = {
Expand All @@ -71,7 +71,7 @@ object Serializer {
|${stmt.ignored}
|${stmt.desc}
|\f
|""".stripMargin)
|""".stripMargin.replaceAll("(\r\n)|\n|\r", "\n"))
}

writeHeader(writer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ object ScoverageCompiler {
version: String
): Option[File] = {
val userHome = System.getProperty("user.home")
val jarPaths = Seq(
s"$userHome/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/$artifactId/$version/$artifactId-$version.jar",
s"$userHome/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/$artifactId/$version/$artifactId-$version.jar"
val jarPaths = Iterator(
".cache/coursier", // Linux
"Library/Caches/Coursier", // MacOSX
"AppData/Local/Coursier/cache" // Windows
).map(loc =>
s"$userHome/$loc/v1/https/repo1.maven.org/maven2/org/scala-lang/$artifactId/$version/$artifactId-$version.jar"
)
jarPaths.map(new File(_)).find(_.exists())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SerializerTest extends AnyFunSuite with OneInstancePerTest {
|false
|def test : String
|\f
|""".stripMargin
|""".stripMargin.replaceAll("(\r\n)|\n|\r", "\n")
val writer = new StringWriter() //TODO-use UTF-8
val actual = Serializer.serialize(coverage, writer)
assert(expected === writer.toString)
Expand Down Expand Up @@ -111,7 +111,7 @@ class SerializerTest extends AnyFunSuite with OneInstancePerTest {
|false
|def test : String
|\f
|""".stripMargin.split("\n").iterator
|""".stripMargin.split("(\r\n)|\n|\r").iterator
val statements = List(
Statement(
Location(
Expand Down