1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:00:04 +08:00

test(win): fix windows test

This commit is contained in:
wsdjeg 2023-08-09 01:25:27 +08:00
parent 80a3a4051c
commit 893bc9ceb4
2 changed files with 20 additions and 10 deletions

View File

@ -28,30 +28,35 @@ function install_nvim($ver)
{
$url = 'https://github.com/neovim/neovim/releases/download/' + $ver + '/nvim-win64.zip'
}
$Env:VIM_BIN = $Env:DEPS + '\Neovim\bin\nvim.exe'
$zip = $Env:DEPS + '\nvim.zip'
(New-Object Net.WebClient).DownloadFile($url, $zip)
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS)
if (Test-Path '$DEPS\Neovim\bin\nvim.exe') {
$Env:VIM_BIN = $Env:DEPS + '\Neovim\bin\nvim.exe'
}else{
$Env:VIM_BIN = $Env:DEPS + '\nvim-win64\bin\nvim.exe'
}
}
function download_lua()
{
$url = 'https://github.com/wsdjeg/vim-galore-zh_cn/releases/download/downdows/lua53.zip'
$zip = $Env:DEPS + '\lua53.zip'
(New-Object Net.WebClient).DownloadFile($url, $zip)
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS + '\vim\vim82')
$zip = $Env:DEPS + '\lua53.zip'
(New-Object Net.WebClient).DownloadFile($url, $zip)
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS + '\vim\vim82')
}
if ($Env:VIM_BIN.StartsWith("nvim"))
{
mkdir $Env:DEPS
install_nvim $Env:VIM_TAG
install_nvim $Env:VIM_TAG
}
elseif ($Env:VIM_BIN.StartsWith("vim"))
{
mkdir $Env:DEPS
install_vim $Env:VIM_TAG
download_lua
install_vim $Env:VIM_TAG
download_lua
}

View File

@ -181,8 +181,13 @@ jobs:
run: |
if ($Env:VIM_BIN.StartsWith("nvim"))
{
$Env:PATH = $Env:DEPS + '\Neovim\bin\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\Neovim\share\nvim'
if (Test-Path '$DEPS\Neovim\bin\nvim.exe') {
$Env:PATH = $Env:DEPS + '\Neovim\bin\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\Neovim\share\nvim'
}else{
$Env:PATH = $Env:DEPS + '\nvim-win64\bin\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\nvim-win64\share\nvim'
}
}
elseif ($Env:VIM_BIN.StartsWith("vim"))
{