Skip to main content

scala-cli-integration-tests

Add or run Scala CLI integration tests. Use when adding integration tests, debugging RunTests/CompileTests/etc., or working in modules/integration.

소스 정보

저장소
VirtusLab/scala-cli
최근 소스 활동
2026년 8월 4일 12:27
감지된 SKILL.md 언어
영어
스타
645
포크
169

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
scala-cli-integration-tests
description
Add or run Scala CLI integration tests. Use when adding integration tests, debugging RunTests/CompileTests/etc., or working in modules/integration.
# Integration tests (Scala CLI) **Location**: `modules/integration/`. Tests invoke the CLI as an external process. **Run**: `./mill -i integration.test.jvm` (all). Filter: `./mill -i integration.test.jvm 'scala.cli.integration.RunTestsDefault.*'` or by test name. Native: `./mill -i integration.test.native`. **Always set `CI=true` when running integration tests**, unless the user explicitly asks otherwise: ```bash CI=true ./mill -i integration.test.jvm 'scala.cli.integration.RunTestsDefault.*' ``` This disables test parallelism, so the run mirrors how the tests behave on CI. It is slower, but the extra time is an acceptable trade-off for reproducible results. **Structure**: `*TestDefinitions.scala` (abstract, holds test logic) → `*TestsDefault`, `*Tests213`, etc. (concrete, Scala version trait). Traits: `TestDefault`, `Test212`, `Test213`, `Test3Lts`, `Test3NextRc`. **Adding a test**: 1. Open the right `*TestDefinitions` (e.g. `RunTestDefinitions` for `run`). 2. Add `test("description") { … }` using `TestInputs(os.rel / "Main.scala" -> "…").fromRoot { root => … }` and `os.proc(TestUtil.cli, "run", …).call(cwd = root)`. 3. Assert on stdout/stderr. **Helpers**: `TestInputs(...).fromRoot`, `TestUtil.cli`. Test groups (CI): `SCALA_CLI_IT_GROUP=1..5`; see `modules/integration/` for group mapping.
GitHub에서 보기