chore: fix test scripts and update test documents (#178)

* chore: fix test scripts and update test documents

* docs: redirect developer who want to build and test to the contributing guide

* dev: change wording
This commit is contained in:
Myriad-Dreamin 2024-04-09 12:37:01 +08:00 committed by GitHub
parent da70c0d31c
commit 59ca5bdabc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 45 additions and 2 deletions

View file

@ -25,3 +25,29 @@ cargo build
```
To run VS Code extension locally, open the repository in VS Code and press `F5` to start a debug session to extension.
## Run analyzer tests
This is required if you have changed any code in `crates/tinymist-query`.
To run analyzer tests for tinymist:
```bash
cargo insta test -p tinymist-query --accept
```
## Run e2e tests
This is required if you have changed any code in `crates/tinymist` or `crates/tinymist-query`.
To run e2e tests for tinymist on Unix systems:
```bash
./scripts/e2e.sh
```
To run e2e tests for tinymist on Windows:
```bash
./scripts/e2e.ps1
```

View file

@ -5,3 +5,7 @@
This crate provides a set of APIs to query the information about the source code. Currently it provides:
+ language queries defined by the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/).
## Contributing
See [CONTRIBUTING.md](https://github.com/Myriad-Dreamin/tinymist/blob/main/CONTRIBUTING.md).

View file

@ -5,3 +5,7 @@
This crate provides rendering features for tinymist server. Currently it provides:
+ rendering in telescope mode for hover.
## Contributing
See [CONTRIBUTING.md](https://github.com/Myriad-Dreamin/tinymist/blob/main/CONTRIBUTING.md).

View file

@ -43,3 +43,7 @@ dhat: The data has been saved to dhat-heap.json, and is viewable with dhat/dh_vi
```
Once you have the `dhat-heap.json`, you can visualize the memory usage with [the DHAT viewer](https://nnethercote.github.io/dh_view/dh_view.html).
## Contributing
See [CONTRIBUTING.md](https://github.com/Myriad-Dreamin/tinymist/blob/main/CONTRIBUTING.md).

View file

@ -1,4 +1,8 @@
$InstallPath = ".\editors\vscode\out"
if (-Not (Test-Path $InstallPath)) {
New-Item -ItemType Directory $InstallPath
}
cargo build --release --bin tinymist
Copy-Item -Path ".\target\release\tinymist.exe" -Destination ".\editors\vscode\out\tinymist.exe" -Force
Copy-Item -Path ".\target\release\tinymist.exe" -Destination "$InstallPath\tinymist.exe" -Force
cargo insta test -p tests --accept

View file

@ -1,3 +1,4 @@
mkdir -p editors/vscode/out/
cargo build --release --bin tinymist
cp target/release/tinymist editors/vscode/out/tinymist
cargo insta test -p tests --accept