Skip to content

Merge pull request #146 from microsoft/LakshyAAAgrawal-patch-19 #276

Merge pull request #146 from microsoft/LakshyAAAgrawal-patch-19

Merge pull request #146 from microsoft/LakshyAAAgrawal-patch-19 #276

name: Test Multilspy
on:
push:
branches: [main, feat/*]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
matrix:
python-version: ["3.10", "3.12", "3.14"]
fail-fast: false
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
# --- System-level dependencies for language servers that do NOT self-download ---
# Gopls requires go + gopls pre-installed
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: '1.21'
- name: Install gopls
run: go install golang.org/x/tools/gopls@latest
# Solargraph requires ruby (installs solargraph gem itself if missing)
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: '3.4'
# TypeScript LS requires node + npm (installs ts-language-server itself via npm)
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
# OmniSharp requires dotnet runtime
- name: Set up .NET
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
dotnet-version: '8.0.x'
# ElixirLS requires Elixir and Erlang/OTP
- name: Set up Elixir
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
elixir-version: '1.18'
otp-version: '27'
# --- Workarounds for GitHub runner environment issues ---
# JDTLS downloads its own JRE, but pre-installed JDKs on the runner
# with broken permissions cause JDTLS initialization to fail
- name: Remove problematic JDK installations
run: |
sudo rm -rf /usr/lib/jvm/temurin-8-jdk-amd64 || true
sudo rm -rf /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64 || true
# KLS downloads its own JRE, but invokes system gradle/mvn for classpath
# resolution. These are pre-installed on GitHub runners but may lack
# execute permissions for non-owner users.
- name: Fix Gradle and Maven permissions
run: |
sudo chmod a+x /usr/bin/gradle /usr/bin/mvn || true
gradle --version || echo "WARNING: gradle not runnable"
mvn --version || echo "WARNING: mvn not runnable"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Run tests
run: pytest tests/multilspy -v --tb=short