ci: refactor and simplify CI process
This commit is contained in:
parent
d47714d87c
commit
815ba835a3
|
@ -80,11 +80,11 @@ jobs:
|
|||
run: ./ci/before_script.sh
|
||||
|
||||
- name: Build nvim
|
||||
run: ./ci/run_tests.sh build
|
||||
run: ./ci/run_tests.sh build_nvim
|
||||
|
||||
- if: "!cancelled()"
|
||||
name: clint
|
||||
run: ./ci/run_lint.sh clint
|
||||
name: clint-full
|
||||
run: ./ci/run_lint.sh clint-full
|
||||
|
||||
- if: "!cancelled()"
|
||||
name: lualint
|
||||
|
@ -99,8 +99,8 @@ jobs:
|
|||
run: ./ci/run_lint.sh shlint
|
||||
|
||||
- if: "!cancelled()"
|
||||
name: single-includes
|
||||
run: ./ci/run_lint.sh single-includes
|
||||
name: check-single-includes
|
||||
run: ./ci/run_lint.sh check-single-includes
|
||||
|
||||
- name: Cache dependencies
|
||||
run: ./ci/before_cache.sh
|
||||
|
@ -201,7 +201,7 @@ jobs:
|
|||
run: ./ci/before_script.sh
|
||||
|
||||
- name: Build
|
||||
run: ./ci/run_tests.sh build
|
||||
run: ./ci/run_tests.sh build_nvim
|
||||
|
||||
- if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && !cancelled()
|
||||
name: Unittests
|
||||
|
|
|
@ -86,7 +86,7 @@ check_sanitizer() {
|
|||
fi
|
||||
}
|
||||
|
||||
run_unittests() {(
|
||||
unittests() {(
|
||||
ulimit -c unlimited || true
|
||||
if ! build_make unittest ; then
|
||||
fail 'unittests' 'Unit tests failed'
|
||||
|
@ -95,7 +95,7 @@ run_unittests() {(
|
|||
check_core_dumps "$(command -v luajit)"
|
||||
)}
|
||||
|
||||
run_functionaltests() {(
|
||||
functionaltests() {(
|
||||
ulimit -c unlimited || true
|
||||
if ! build_make ${FUNCTIONALTEST}; then
|
||||
fail 'functionaltests' 'Functional tests failed'
|
||||
|
@ -106,7 +106,7 @@ run_functionaltests() {(
|
|||
check_core_dumps
|
||||
)}
|
||||
|
||||
run_oldtests() {(
|
||||
oldtests() {(
|
||||
ulimit -c unlimited || true
|
||||
if ! make oldtest; then
|
||||
reset
|
||||
|
|
|
@ -10,34 +10,15 @@ source "${CI_DIR}/common/suite.sh"
|
|||
|
||||
rm -f "$END_MARKER"
|
||||
|
||||
if [[ "$GITHUB_ACTIONS" != "true" ]]; then
|
||||
make clint-full || fail 'clint'
|
||||
make lualint || fail 'lualint'
|
||||
make pylint || fail 'pylint'
|
||||
make shlint || fail 'shlint'
|
||||
make check-single-includes || fail 'single-includes'
|
||||
|
||||
end_tests
|
||||
# Run all tests if no input argument is given
|
||||
if (($# == 0)); then
|
||||
tests=('clint-full' 'lualint' 'pylint' 'shlint' 'check-single-includes')
|
||||
else
|
||||
case "$1" in
|
||||
clint)
|
||||
make clint-full || fail 'clint'
|
||||
;;
|
||||
lualint)
|
||||
make lualint || fail 'lualint'
|
||||
;;
|
||||
pylint)
|
||||
make pylint || fail 'pylint'
|
||||
;;
|
||||
shlint)
|
||||
make shlint || fail 'shlint'
|
||||
;;
|
||||
single-includes)
|
||||
make check-single-includes || fail 'single-includes'
|
||||
;;
|
||||
*)
|
||||
:;;
|
||||
esac
|
||||
|
||||
end_tests
|
||||
tests=("$@")
|
||||
fi
|
||||
|
||||
for i in "${tests[@]}"; do
|
||||
make "$i" || fail "$i"
|
||||
done
|
||||
|
||||
end_tests
|
||||
|
|
|
@ -10,41 +10,26 @@ source "${CI_DIR}/common/suite.sh"
|
|||
|
||||
rm -f "$END_MARKER"
|
||||
|
||||
if [[ "$GITHUB_ACTIONS" != "true" ]]; then
|
||||
build_nvim || fail 'build'
|
||||
# Run all tests (with some caveats) if no input argument is given
|
||||
if (($# == 0)); then
|
||||
tests=('build_nvim')
|
||||
|
||||
if test "$CLANG_SANITIZER" != "TSAN"; then
|
||||
# Additional threads are only created when the builtin UI starts, which
|
||||
# doesn't happen in the unit/functional tests
|
||||
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
|
||||
run_unittests || fail 'unittests'
|
||||
tests+=('unittests')
|
||||
fi
|
||||
run_functionaltests || fail 'functionaltests'
|
||||
tests+=('functionaltests')
|
||||
fi
|
||||
run_oldtests || fail 'oldtests'
|
||||
install_nvim || fail 'install_nvim'
|
||||
|
||||
end_tests
|
||||
tests+=('oldtests' 'install_nvim')
|
||||
else
|
||||
case "$1" in
|
||||
build)
|
||||
build_nvim || fail 'build'
|
||||
;;
|
||||
unittests)
|
||||
run_unittests || fail 'unittests'
|
||||
;;
|
||||
functionaltests)
|
||||
run_functionaltests || fail 'functionaltests'
|
||||
;;
|
||||
oldtests)
|
||||
run_oldtests || fail 'oldtests'
|
||||
;;
|
||||
install_nvim)
|
||||
install_nvim || fail 'install_nvim'
|
||||
;;
|
||||
*)
|
||||
:;;
|
||||
esac
|
||||
|
||||
end_tests
|
||||
tests=("$@")
|
||||
fi
|
||||
|
||||
for i in "${tests[@]}"; do
|
||||
eval "$i" || fail "$i"
|
||||
done
|
||||
|
||||
end_tests
|
||||
|
|
Loading…
Reference in New Issue