ale
ale copied to clipboard
Run Windows Tests in GitHub Actions
I don't think anyone but me really knows how to run the tests on Windows locally, and even then it kind of sucks and doesn't work so well. We should create an easy to use test image for running tests on Windows locally. Whether it's some Docker like thing, a ReactOS pre-built ISO, or whatever.
With this in place, we can consider getting rid of AppVeyor again.
FYI @hsanson
I tried this again, but Windows tests in GitHub actions are just far, far too slow. I gave up after waiting for twice the speed at which AppVeyor builds for tests to finish running. I'll post the YAML config I ended up with before I gave up below.
test_ale_windows:
runs-on: windows-2019
steps:
- name: Configure Git
# Stop git from changing newlines
run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- name: Cache Vim
id: cache-vim
uses: actions/cache@v3
with:
path: vim
key: ${{ runner.os }}-vim
- name: Install Vim
if: steps.cache-vim.outputs.cache-hit != 'true'
shell: pwsh
run: >-
if (!(Test-Path -Path vim)){
Add-Type -A System.IO.Compression.FileSystem
Invoke-WebRequest http://ftp.vim.org/pub/vim/pc/vim80-586w32.zip `
-OutFile vim.zip
[IO.Compression.ZipFile]::ExtractToDirectory('vim.zip', 'vim')
Invoke-WebRequest http://ftp.vim.org/pub/vim/pc/vim80-586rt.zip `
-OutFile rt.zip
[IO.Compression.ZipFile]::ExtractToDirectory('rt.zip', 'vim')
}
- name: Try to Restore Vader
id: cache-vader
uses: actions/cache@v3
with:
path: vader
key: ${{ runner.os }}-vader
- name: Cache Vader
if: steps.cache-vader.outputs.cache-hit != 'true'
shell: pwsh
run: >-
if (!(Test-Path -Path vader)){
git clone https://github.com/junegunn/vader.vim vader 2> $null
cd vader
git checkout -qf c6243dd81c98350df4dec608fa972df98fa2a3af 2> $null
}
- name: Run tests
# yamllint disable rule:line-length
run: |
vim\vim\vim80\vim.exe -u test\vimrc "+Vader! test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*.vader"
# yamllint enable rule:line-length