mirror of
https://github.com/neovim/neovim.git
synced 2025-11-20 09:06:31 +00:00
Merge pull request #18904 from jamessan/no-parser-ci
ci: run tests with no treesitter parsers installed
This commit is contained in:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -167,11 +167,12 @@ jobs:
|
|||||||
runner: macos-11.0
|
runner: macos-11.0
|
||||||
os: osx
|
os: osx
|
||||||
|
|
||||||
# The functionaltest-lua test two things simultaneously:
|
# functionaltest-lua is our dumping ground for non-mainline configurations.
|
||||||
# 1. Check that the tests pass with PUC Lua instead of LuaJIT.
|
# 1. Check that the tests pass with PUC Lua instead of LuaJIT.
|
||||||
# 2. Use as oldest/minimum versions of dependencies/build tools we
|
# 2. Use as oldest/minimum versions of dependencies/build tools we
|
||||||
# still explicitly support so we don't accidentally rely on
|
# still explicitly support so we don't accidentally rely on
|
||||||
# features that is only available on later versions.
|
# features that is only available on later versions.
|
||||||
|
# 3. No treesitter parsers installed.
|
||||||
- flavor: functionaltest-lua
|
- flavor: functionaltest-lua
|
||||||
cc: gcc
|
cc: gcc
|
||||||
runner: ubuntu-20.04
|
runner: ubuntu-20.04
|
||||||
|
|||||||
2
.github/workflows/env.sh
vendored
2
.github/workflows/env.sh
vendored
@@ -64,7 +64,7 @@ EOF
|
|||||||
functionaltest-lua)
|
functionaltest-lua)
|
||||||
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
|
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
|
||||||
FUNCTIONALTEST=functionaltest-lua
|
FUNCTIONALTEST=functionaltest-lua
|
||||||
DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
|
DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_TS_PARSERS=OFF"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -720,14 +720,10 @@ function module.pending_win32(pending_fn)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function module.pending_c_parser(pending_fn)
|
function module.pending_c_parser(pending_fn)
|
||||||
local status, msg = unpack(module.exec_lua([[ return {pcall(vim.treesitter.require_language, 'c')} ]]))
|
local status, _ = unpack(module.exec_lua([[ return {pcall(vim.treesitter.require_language, 'c')} ]]))
|
||||||
if not status then
|
if not status then
|
||||||
if module.isCI() then
|
pending_fn 'no C parser, skipping'
|
||||||
error("treesitter C parser not found, required on CI: " .. msg)
|
return true
|
||||||
else
|
|
||||||
pending_fn 'no C parser, skipping'
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user