Skip to content

Commit afe3262

Browse files
Merge pull request #204 from alexarchambault/less-tests
Run less tests on CI
2 parents 48583db + 57eb4a9 commit afe3262

File tree

10 files changed

+59
-113
lines changed

10 files changed

+59
-113
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
# Running into https://github.com/oracle/graal/issues/3171 on windows-latest / windows-2019
23-
OS: ["ubuntu-latest", "macos-latest", "windows-2016"]
22+
# If adding Windows here, use windows-2016 rather than windows-latest or windows-2019.
23+
# Running into https://github.com/oracle/graal/issues/3171 on windows-latest / windows-2019.
24+
OS: ["ubuntu-latest"]
2425
steps:
2526
- uses: actions/checkout@v2
2627
with:
@@ -32,9 +33,9 @@ jobs:
3233
jvm: 8
3334
- name: Copy launcher
3435
run: ./mill -i copyJvmLauncher artifacts/
35-
if: runner.os == 'Linux' || runner.os == 'Windows'
36+
if: runner.os == 'Linux'
3637
- uses: actions/[email protected]
37-
if: runner.os == 'Linux' || runner.os == 'Windows'
38+
if: runner.os == 'Linux'
3839
with:
3940
name: launchers
4041
path: artifacts/

modules/integration/src/test/scala/scala/cli/integration/BspTests3.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

modules/integration/src/test/scala/scala/cli/integration/CompileTests3.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

modules/integration/src/test/scala/scala/cli/integration/ExportMillTests3.scala

Lines changed: 0 additions & 32 deletions
This file was deleted.

modules/integration/src/test/scala/scala/cli/integration/ExportSbtTests3.scala

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package scala.cli.integration
2+
3+
import com.eed3si9n.expecty.Expecty.expect
4+
5+
class MetaCheck extends munit.FunSuite {
6+
/*
7+
* We don't run tests with --scala 3.… any more, and only rely on those
8+
* with no --scala option.
9+
* The test here ensures the default version is indeed Scala 3.
10+
*/
11+
test("Scala 3 is the default") {
12+
val testInputs = TestInputs(
13+
Seq(
14+
os.rel / "PrintScalaVersion.scala" ->
15+
"""// https://gist.github.com/romanowski/de14691cab7340134e197419bc48919a
16+
|
17+
|object PrintScalaVersion extends App {
18+
| def props(url: java.net.URL): java.util.Properties = {
19+
| val properties = new java.util.Properties()
20+
| val is = url.openStream()
21+
| try {
22+
| properties.load(is)
23+
| properties
24+
| } finally is.close()
25+
| }
26+
|
27+
| def scala2Version: String =
28+
| props(getClass.getResource("/library.properties")).getProperty("version.number")
29+
|
30+
| def checkScala3(res: java.util.Enumeration[java.net.URL]): String =
31+
| if (!res.hasMoreElements) scala2Version else {
32+
| val manifest = props(res.nextElement)
33+
| manifest.getProperty("Specification-Title") match {
34+
| case "scala3-library-bootstrapped" =>
35+
| manifest.getProperty("Implementation-Version")
36+
| case _ => checkScala3(res)
37+
| }
38+
| }
39+
| val manifests = getClass.getClassLoader.getResources("META-INF/MANIFEST.MF")
40+
|
41+
| val scalaVersion = checkScala3(manifests)
42+
|
43+
| println(scalaVersion)
44+
|}
45+
|""".stripMargin
46+
)
47+
)
48+
testInputs.fromRoot { root =>
49+
val res = os.proc(TestUtil.cli, ".").call(cwd = root)
50+
val scalaVersion = res.out.text().trim
51+
expect(scalaVersion == Constants.scala3)
52+
}
53+
}
54+
}

modules/integration/src/test/scala/scala/cli/integration/PackageTests3.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

modules/integration/src/test/scala/scala/cli/integration/ReplTests3.scala

Lines changed: 0 additions & 10 deletions
This file was deleted.

modules/integration/src/test/scala/scala/cli/integration/RunTests3.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

modules/integration/src/test/scala/scala/cli/integration/TestTests3.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)