Skip to content

Commit

Permalink
Add compatibility test for ruff-lsp to CI (#8016)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zanieb authored Oct 23, 2023
1 parent 7100e12 commit 802616a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,45 @@ jobs:
- name: "Remove checkouts from cache"
run: rm -r target/progress_projects

check-ruff-lsp:
name: "test ruff-lsp"
runs-on: ubuntu-latest
needs: cargo-test
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v4
name: "Download ruff-lsp source"
with:
repository: "astral-sh/ruff-lsp"

- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- uses: actions/download-artifact@v3
name: Download development ruff binary
id: ruff-target
with:
name: ruff
path: target/debug

- name: Install ruff-lsp dependencies
run: |
just install
- name: Run ruff-lsp tests
run: |
# Setup development binary
pip uninstall --yes ruff
chmod +x ${{ steps.ruff-target.outputs.download-path }}/ruff
export PATH=${{ steps.ruff-target.outputs.download-path }}:$PATH
ruff version
just test
benchmarks:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 802616a

Please sign in to comment.