Files
neovim/.github/workflows/test_windows.yml
Daniel Hast 755087f8ef ci: set default permissions for workflows
The default workflow permissions are overly broad; setting permissions
explicitly at the workflow level ensures excessive permissions are not
unintentionally granted to jobs. For details, see:
https://docs.zizmor.sh/audits/#excessive-permissions
2026-03-09 21:36:20 -04:00

89 lines
2.4 KiB
YAML

name: windows
on:
workflow_call:
inputs:
build_flags:
type: string
functionaltest_timeout:
default: 20
type: number
workflow_dispatch:
permissions:
contents: read
jobs:
windows:
runs-on: windows-2025
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
test: [functional, old]
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/setup
- name: Build deps
run: |
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
cmake --build .deps
- name: Build
run: |
cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' ${{ inputs.build_flags }}
cmake --build build
- name: Install test deps
run: |
$PSNativeCommandArgumentPassing = 'Legacy'
& build\bin\nvim.exe "--version"
# Ensure that the "win32" feature is set.
& build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"'
python -m pip install pynvim
# Sanity check
python -c "import pynvim; print(str(pynvim))"
node --version
npm.cmd --version
npm.cmd install -g neovim
Get-Command -CommandType Application neovim-node-host.cmd
npm.cmd link neovim
- if: ${{ matrix.test == 'functional' }}
name: functionaltest
timeout-minutes: ${{ inputs.functionaltest_timeout }}
env:
# With parallel tests, use shorter timeout for a single group.
TEST_TIMEOUT: 600
run: |
$ErrorActionPreference = 'Continue'
# `-k 0` tells ninja to continue running all targets even if some fail.
cmake --build build --target functionaltest-parallel -j 2 -- -k 0
$exitCode = $LASTEXITCODE
cmake --build build --target functionaltest-summary
exit $exitCode
- if: ${{ matrix.test == 'old' }}
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
with:
update: true
install: unzip
pacboy: >-
make:p gcc:p diffutils:p
release: false
- if: ${{ matrix.test == 'old' }}
name: oldtest
shell: msys2 {0}
run: |
cd test/old/testdir
mingw32-make VERBOSE=1