Skip to content
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

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 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
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
- name: Setup Rust and cargo-nextest
uses: moonrepo/setup-rust@v0
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
channel: stable
cache-target: release
bins: 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 --profile ci --config-file sway-lsp/tests/nextest.toml
cargo-test-workspace:
runs-on: ubuntu-latest
steps:
Expand Down
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
6 changes: 6 additions & 0 deletions sway-lsp/tests/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.ci]
retries = 0

[[profile.ci.overrides]]
filter = 'test(go_to_definition_for_paths)'
retries = 2
Loading