Skip to content

Commit 287f746

Browse files
committed
chore: add tests for tasty-core (non-bootstrapped and bootstrapped)
1 parent d09c5c1 commit 287f746

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/stdlib.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,37 @@ jobs:
220220
- uses: sbt/setup-sbt@v1
221221
- name: Test `scala3-sbt-bridge-bootstrapped`
222222
run: ./project/scripts/sbt scala3-sbt-bridge-bootstrapped/test
223+
224+
test-tasty-core-nonbootstrapped:
225+
runs-on: ubuntu-latest
226+
##needs: [tasty-core-nonbootstrapped] Add when we add support for caching here
227+
steps:
228+
- name: Git Checkout
229+
uses: actions/checkout@v4
230+
231+
- name: Set up JDK 17
232+
uses: actions/setup-java@v4
233+
with:
234+
distribution: 'temurin'
235+
java-version: 17
236+
cache: 'sbt'
237+
- uses: sbt/setup-sbt@v1
238+
- name: Test `tasty-core-nonbootstrapped`
239+
run: ./project/scripts/sbt tasty-core-nonbootstrapped/test
240+
241+
test-tasty-core-bootstrapped:
242+
runs-on: ubuntu-latest
243+
##needs: [tasty-core-bootstrapped] Add when we add support for caching here
244+
steps:
245+
- name: Git Checkout
246+
uses: actions/checkout@v4
247+
248+
- name: Set up JDK 17
249+
uses: actions/setup-java@v4
250+
with:
251+
distribution: 'temurin'
252+
java-version: 17
253+
cache: 'sbt'
254+
- uses: sbt/setup-sbt@v1
255+
- name: Test `tasty-core-bootstrapped`
256+
run: ./project/scripts/sbt tasty-core-bootstrapped-new/test

project/Build.scala

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,10 +1737,17 @@ object Build {
17371737
autoScalaLibrary := false,
17381738
// Add the source directories for the stdlib (non-boostrapped)
17391739
Compile / unmanagedSourceDirectories := Seq(baseDirectory.value / "src"),
1740+
Test / unmanagedSourceDirectories := Seq(baseDirectory.value / "test"),
17401741
Compile / unmanagedSourceDirectories += baseDirectory.value / "src-non-bootstrapped",
1742+
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1743+
Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
17411744
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
17421745
Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion),
17431746
Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion),
1747+
// Add all the project's external dependencies
1748+
libraryDependencies ++= Seq(
1749+
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
1750+
),
17441751
// Packaging configuration of the stdlib
17451752
Compile / packageBin / publishArtifact := true,
17461753
Compile / packageDoc / publishArtifact := false,
@@ -1768,6 +1775,11 @@ object Build {
17681775
state.value,
17691776
scalaInstanceTopLoader.value,
17701777
)},
1778+
// Add configuration of the test
1779+
Test / envVars ++= Map(
1780+
"EXPECTED_TASTY_VERSION" -> expectedTastyVersion,
1781+
),
1782+
17711783
)
17721784

17731785
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-bootstrapped project */
@@ -1784,10 +1796,17 @@ object Build {
17841796
autoScalaLibrary := false,
17851797
// Add the source directories for the stdlib (non-boostrapped)
17861798
Compile / unmanagedSourceDirectories := Seq(baseDirectory.value / "src"),
1799+
Test / unmanagedSourceDirectories := Seq(baseDirectory.value / "test"),
17871800
Compile / unmanagedSourceDirectories += baseDirectory.value / "src-bootstrapped",
1801+
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1802+
Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
17881803
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
17891804
Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion),
17901805
Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion),
1806+
// Add all the project's external dependencies
1807+
libraryDependencies ++= Seq(
1808+
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
1809+
),
17911810
// Packaging configuration of the stdlib
17921811
Compile / packageBin / publishArtifact := true,
17931812
Compile / packageDoc / publishArtifact := false,
@@ -1824,6 +1843,10 @@ object Build {
18241843
scalaCompilerBridgeBinaryJar := {
18251844
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
18261845
},
1846+
// Add configuration of the test
1847+
Test / envVars ++= Map(
1848+
"EXPECTED_TASTY_VERSION" -> expectedTastyVersion,
1849+
),
18271850
)
18281851

18291852
// ==============================================================================================

0 commit comments

Comments
 (0)