Skip to content

Commit 802616a

Browse files
authored
Add compatibility test for ruff-lsp to CI (#8016)
Adds a CI job which runs `ruff-lsp` tests against the current Ruff build. Avoids rebuilding Ruff at the cost of running _after_ the cargo tests have finished. Might be worth the rebuild to get earlier feedback but I don't expect it to fail often? xref astral-sh/ruff-lsp#286 ## Test plan Verified use of the development version by inspecting version output in CI; supported by astral-sh/ruff-lsp#289 and #8034
1 parent 7100e12 commit 802616a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,45 @@ jobs:
337337
- name: "Remove checkouts from cache"
338338
run: rm -r target/progress_projects
339339

340+
check-ruff-lsp:
341+
name: "test ruff-lsp"
342+
runs-on: ubuntu-latest
343+
needs: cargo-test
344+
steps:
345+
- uses: extractions/setup-just@v1
346+
env:
347+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
348+
349+
- uses: actions/checkout@v4
350+
name: "Download ruff-lsp source"
351+
with:
352+
repository: "astral-sh/ruff-lsp"
353+
354+
- uses: actions/setup-python@v4
355+
with:
356+
python-version: ${{ env.PYTHON_VERSION }}
357+
358+
- uses: actions/download-artifact@v3
359+
name: Download development ruff binary
360+
id: ruff-target
361+
with:
362+
name: ruff
363+
path: target/debug
364+
365+
- name: Install ruff-lsp dependencies
366+
run: |
367+
just install
368+
369+
- name: Run ruff-lsp tests
370+
run: |
371+
# Setup development binary
372+
pip uninstall --yes ruff
373+
chmod +x ${{ steps.ruff-target.outputs.download-path }}/ruff
374+
export PATH=${{ steps.ruff-target.outputs.download-path }}:$PATH
375+
ruff version
376+
377+
just test
378+
340379
benchmarks:
341380
runs-on: ubuntu-latest
342381
steps:

0 commit comments

Comments
 (0)