Files
neovim/.github/workflows/test_windows.yml
Daniel Hast 3572bf7e16 ci: eliminate template expansion in code contexts
Replace all template expansions in code contexts with environment
variable substitutions. Template expansion in code contexts can be a
source of code injection vulnerabilities; for more info, see:
https://docs.zizmor.sh/audits/#template-injection
2026-03-09 21:40:39 -04:00

91 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
env:
BUILD_FLAGS: ${{ inputs.build_flags }}
run: |
cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' $env: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