mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +08:00
test(win): fix windows test
This commit is contained in:
parent
80a3a4051c
commit
893bc9ceb4
@ -28,30 +28,35 @@ function install_nvim($ver)
|
|||||||
{
|
{
|
||||||
$url = 'https://github.com/neovim/neovim/releases/download/' + $ver + '/nvim-win64.zip'
|
$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'
|
$zip = $Env:DEPS + '\nvim.zip'
|
||||||
(New-Object Net.WebClient).DownloadFile($url, $zip)
|
(New-Object Net.WebClient).DownloadFile($url, $zip)
|
||||||
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
|
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
|
||||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS)
|
[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()
|
function download_lua()
|
||||||
{
|
{
|
||||||
$url = 'https://github.com/wsdjeg/vim-galore-zh_cn/releases/download/downdows/lua53.zip'
|
$url = 'https://github.com/wsdjeg/vim-galore-zh_cn/releases/download/downdows/lua53.zip'
|
||||||
$zip = $Env:DEPS + '\lua53.zip'
|
$zip = $Env:DEPS + '\lua53.zip'
|
||||||
(New-Object Net.WebClient).DownloadFile($url, $zip)
|
(New-Object Net.WebClient).DownloadFile($url, $zip)
|
||||||
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
|
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
|
||||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS + '\vim\vim82')
|
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS + '\vim\vim82')
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Env:VIM_BIN.StartsWith("nvim"))
|
if ($Env:VIM_BIN.StartsWith("nvim"))
|
||||||
{
|
{
|
||||||
mkdir $Env:DEPS
|
mkdir $Env:DEPS
|
||||||
install_nvim $Env:VIM_TAG
|
install_nvim $Env:VIM_TAG
|
||||||
}
|
}
|
||||||
elseif ($Env:VIM_BIN.StartsWith("vim"))
|
elseif ($Env:VIM_BIN.StartsWith("vim"))
|
||||||
{
|
{
|
||||||
mkdir $Env:DEPS
|
mkdir $Env:DEPS
|
||||||
install_vim $Env:VIM_TAG
|
install_vim $Env:VIM_TAG
|
||||||
download_lua
|
download_lua
|
||||||
}
|
}
|
||||||
|
9
.github/workflows/check.yml
vendored
9
.github/workflows/check.yml
vendored
@ -181,8 +181,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
if ($Env:VIM_BIN.StartsWith("nvim"))
|
if ($Env:VIM_BIN.StartsWith("nvim"))
|
||||||
{
|
{
|
||||||
$Env:PATH = $Env:DEPS + '\Neovim\bin\;' + $Env:PATH
|
if (Test-Path '$DEPS\Neovim\bin\nvim.exe') {
|
||||||
$Env:VIM = $Env:DEPS + '\Neovim\share\nvim'
|
$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"))
|
elseif ($Env:VIM_BIN.StartsWith("vim"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user