Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use cargo-nextest with retries for flaky LSP test #6521

Merged
merged 6 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,12 @@ jobs:
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Install cargo-nextest
run: cargo install cargo-nextest
- name: Run sway-lsp tests sequentially
env:
RUST_BACKTRACE: full
run: cargo test --locked --release -p sway-lsp -- --nocapture --test-threads=1
run: cargo nextest run --locked --release -p sway-lsp --no-capture
cargo-test-workspace:
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,13 @@ authors = ["Fuel Labs <contact@fuel.sh>"]
homepage = "https://fuel.network/"
license = "Apache-2.0"
repository = "https://github.com/FuelLabs/sway"

[workspace.metadata.nextest]
default-profile = "ci"

[workspace.metadata.nextest.profile.ci]
retries = 0 # Set default retries to 0

[[workspace.metadata.nextest.profile.ci.overrides]]
filter = 'test(go_to_definition_for_paths)'
retries = 2
1 change: 0 additions & 1 deletion sway-lsp/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,6 @@ fn go_to_definition_for_paths() {
lsp::definition_check_with_req_offset(&server, &mut go_to, 7, 11).await;
lsp::definition_check_with_req_offset(&server, &mut go_to, 7, 23).await;

// // TODO: This test stopped working when https://github.com/FuelLabs/sway/pull/6116 was merged.
let mut go_to = GotoDefinition {
req_uri: &uri,
req_line: 22,
Expand Down
Loading