Skip to content

chore: add support for sbt-test in the new build #23748

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
23 changes: 23 additions & 0 deletions .github/workflows/stdlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,26 @@ jobs:
- uses: sbt/setup-sbt@v1
- name: Test `tasty-core-bootstrapped`
run: ./project/scripts/sbt tasty-core-bootstrapped-new/test

sbt-test:
runs-on: ubuntu-latest
##needs: [scala3-sbt-bridge-bootstrapped,
## scala3-library-bootstrapped,
## scala3-compiler-bootstrapped,
## tasty-core-bootstrapped,
## scala3-library-sjs,
## scala3-tasty-inspector,
## scala3-staging] Add when we add support for caching here
steps:
- name: Git Checkout
uses: actions/checkout@v5

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- name: Run `sbt-test`
run: ./project/scripts/sbt sbt-test-new/scripted
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ val sjsJUnitTests = Build.sjsJUnitTests
val sjsCompilerTests = Build.sjsCompilerTests

val `sbt-test` = Build.`sbt-test`
val `sbt-test-new` = Build.`sbt-test-new`

inThisBuild(Build.thisBuildSettings)
inScope(Global)(Build.globalSettings)
21 changes: 21 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2368,6 +2368,27 @@ object Build {
}.taskValue,
)

// ==============================================================================================
// ========================================= TEST SUITE =========================================
// ==============================================================================================

lazy val `sbt-test-new` = project.in(file("sbt-test"))
.enablePlugins(ScriptedPlugin)
.settings(
sbtTestDirectory := baseDirectory.value,
// The batch mode accidentally became the default with no way to disable
// it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
// We enable it explicitly here to make it clear that we're using it.
scriptedBatchExecution := true,
scriptedLaunchOpts ++= Seq(
s"-Dplugin.scalaVersion=${dottyVersion}",
s"-Dplugin.scala2Version=${stdlibVersion(Bootstrapped)}",
s"-Dplugin.scalaJSVersion=${scalaJSVersion}",
),
scriptedBufferLog := true,
scripted := scripted.dependsOn(`scala3-bootstrapped-new` / publishLocalBin).evaluated
)

def dottyLibrary(implicit mode: Mode): Project = mode match {
case NonBootstrapped => `scala3-library`
case Bootstrapped => `scala3-library-bootstrapped`
Expand Down
Loading