mirror of
https://github.com/tiennm99/serena.git
synced 2026-08-06 06:24:34 +00:00
GH: cache gopls and language server deps. Remove terraform-ls intallation
terraform-ls is installed on the fly
This commit is contained in:
committed by
Michael Panchenko
parent
3e1b7e1f56
commit
c8d79786e4
@@ -32,7 +32,16 @@ jobs:
|
||||
# Add Go bin directory to PATH for this workflow
|
||||
# GITHUB_PATH is a special file that GitHub Actions uses to modify PATH
|
||||
# Writing to this file adds the directory to the PATH for subsequent steps
|
||||
- name: Cache Go binaries
|
||||
id: cache-go-binaries
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/go/bin
|
||||
~/.cache/go-build
|
||||
key: go-binaries-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-gopls-latest
|
||||
- name: Install gopls
|
||||
if: steps.cache-go-binaries.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: go install golang.org/x/tools/gopls@latest
|
||||
- name: Set up Elixir
|
||||
@@ -56,35 +65,6 @@ jobs:
|
||||
with:
|
||||
terraform_version: "1.5.0"
|
||||
terraform_wrapper: false
|
||||
- name: Install terraform-ls (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Host "Installing terraform-ls manually for Windows"
|
||||
$ver = '0.32.7'
|
||||
$zip = "terraform-ls_${ver}_windows_amd64.zip"
|
||||
Invoke-WebRequest -Uri "https://releases.hashicorp.com/terraform-ls/$ver/$zip" -OutFile $zip
|
||||
|
||||
$dest = "$env:USERPROFILE\terraform-ls"
|
||||
New-Item -ItemType Directory -Force -Path $dest | Out-Null
|
||||
Expand-Archive $zip -DestinationPath $dest -Force
|
||||
|
||||
Write-Host "terraform-ls installed to: $dest"
|
||||
echo "$dest" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: Install terraform-ls (Linux/macOS)
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
ver=0.32.7
|
||||
os=$(uname | tr '[:upper:]' '[:lower:]')
|
||||
echo "Installing terraform-ls ${ver} for ${os}"
|
||||
curl -sSL -o tfls.zip \
|
||||
"https://releases.hashicorp.com/terraform-ls/${ver}/terraform-ls_${ver}_${os}_amd64.zip"
|
||||
mkdir -p "$HOME/bin"
|
||||
unzip -q tfls.zip -d "$HOME/bin"
|
||||
chmod +x "$HOME/bin/terraform-ls"
|
||||
echo "$HOME/bin" >> "$GITHUB_PATH"
|
||||
echo "terraform-ls installed to $HOME/bin"
|
||||
- name: Install uv
|
||||
shell: bash
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
@@ -94,6 +74,12 @@ jobs:
|
||||
with:
|
||||
path: .venv
|
||||
key: uv-venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
|
||||
- name: Cache language servers
|
||||
id: cache-language-servers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: src/solidlsp/language_servers/static
|
||||
key: language-servers-${{ runner.os }}-${{ hashFiles('src/solidlsp/language_servers/static/**') }}
|
||||
- name: Create virtual environment
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user