mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	ci: run each test suite in a separate github step
This should help combat some of the lagginess when looking at the CI logs in the browser.
This commit is contained in:
		
							
								
								
									
										44
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										44
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -43,8 +43,25 @@ jobs: | ||||
|       - name: Build third-party | ||||
|         run: ./ci/before_script.sh | ||||
|  | ||||
|       - name: Run lint | ||||
|         run: ./ci/script.sh | ||||
|       - if: "!cancelled()" | ||||
|         name: clint | ||||
|         run: ./ci/run_lint.sh clint | ||||
|  | ||||
|       - if: "!cancelled()" | ||||
|         name: lualint | ||||
|         run: ./ci/run_lint.sh lualint | ||||
|  | ||||
|       - if: "!cancelled()" | ||||
|         name: pylint | ||||
|         run: ./ci/run_lint.sh pylint | ||||
|  | ||||
|       - if: "!cancelled()" | ||||
|         name: shlint | ||||
|         run: ./ci/run_lint.sh shlint | ||||
|  | ||||
|       - if: "!cancelled()" | ||||
|         name: single-includes | ||||
|         run: ./ci/run_lint.sh single-includes | ||||
|  | ||||
|       - name: Cache dependencies | ||||
|         if: ${{ success() }} | ||||
| @@ -126,8 +143,7 @@ jobs: | ||||
|           brew install automake ccache perl cpanminus ninja | ||||
|  | ||||
|       - name: Setup interpreter packages | ||||
|         run: | | ||||
|           ./ci/install.sh | ||||
|         run: ./ci/install.sh | ||||
|  | ||||
|       - name: Cache dependencies | ||||
|         uses: actions/cache@v2 | ||||
| @@ -140,8 +156,24 @@ jobs: | ||||
|       - name: Build third-party | ||||
|         run: ./ci/before_script.sh | ||||
|  | ||||
|       - name: Build and test | ||||
|         run: ./ci/script.sh | ||||
|       - name: Build | ||||
|         run: ./ci/run_tests.sh build | ||||
|  | ||||
|       - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && !cancelled() | ||||
|         name: Unittests | ||||
|         run: ./ci/run_tests.sh unittests | ||||
|  | ||||
|       - if: matrix.flavor != 'tsan' && !cancelled() | ||||
|         name: Functionaltests | ||||
|         run: ./ci/run_tests.sh functionaltests | ||||
|  | ||||
|       - if: "!cancelled()" | ||||
|         name: Oldtests | ||||
|         run: ./ci/run_tests.sh oldtests | ||||
|  | ||||
|       - if: "!cancelled()" | ||||
|         name: Install nvim | ||||
|         run: ./ci/run_tests.sh install_nvim | ||||
|  | ||||
|       - name: Cache dependencies | ||||
|         if: ${{ success() }} | ||||
|   | ||||
| @@ -11,37 +11,17 @@ FAIL_SUMMARY="" | ||||
| END_MARKER="$BUILD_DIR/.tests_finished" | ||||
| FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors" | ||||
|  | ||||
| ci_fold() { | ||||
|   if test "$GITHUB_ACTIONS" = "true"; then | ||||
|     local action="$1" | ||||
|     local name="$2" | ||||
|     case "$action" in | ||||
|       start) | ||||
|         echo "::group::${name}" | ||||
|         ;; | ||||
|       end) | ||||
|         echo "::endgroup::" | ||||
|         ;; | ||||
|       *) | ||||
|         :;; | ||||
|     esac | ||||
|   fi | ||||
| } | ||||
|  | ||||
| enter_suite() { | ||||
|   FAILED=0 | ||||
|   rm -f "${END_MARKER}" | ||||
|   local suite_name="$1" | ||||
|   export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name" | ||||
|   ci_fold "start" "$suite_name" | ||||
| } | ||||
|  | ||||
| exit_suite() { | ||||
|   if test $FAILED -ne 0 ; then | ||||
|     echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:" | ||||
|     echo "${FAIL_SUMMARY}" | ||||
|   else | ||||
|     ci_fold "end" "" | ||||
|   fi | ||||
|   export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}" | ||||
|   FAILED=0 | ||||
| @@ -66,6 +46,11 @@ ended_successfully() { | ||||
|   if test -f "${FAIL_SUMMARY_FILE}" ; then | ||||
|     echo 'Test failed, complete summary:' | ||||
|     cat "${FAIL_SUMMARY_FILE}" | ||||
|  | ||||
|     if [[ "$GITHUB_ACTIONS" == "true" ]]; then | ||||
|         rm -f "$FAIL_SUMMARY_FILE" | ||||
|     fi | ||||
|  | ||||
|     return 1 | ||||
|   fi | ||||
|   if ! test -f "${END_MARKER}" ; then | ||||
|   | ||||
| @@ -8,6 +8,7 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||||
| source "${CI_DIR}/common/build.sh" | ||||
| source "${CI_DIR}/common/suite.sh" | ||||
|  | ||||
| if [[ "$GITHUB_ACTIONS" != "true" ]]; then | ||||
|   run_suite 'make clint-full' 'clint' | ||||
|   run_suite 'make lualint' 'lualint' | ||||
|   run_suite 'make pylint' 'pylint' | ||||
| @@ -15,3 +16,26 @@ run_suite 'make shlint' 'shlint' | ||||
|   run_suite 'make check-single-includes' 'single-includes' | ||||
|  | ||||
|   end_tests | ||||
| else | ||||
|   case "$1" in | ||||
|     clint) | ||||
|       run_suite 'make clint-full' 'clint' | ||||
|       ;; | ||||
|     lualint) | ||||
|       run_suite 'make lualint' 'lualint' | ||||
|       ;; | ||||
|     pylint) | ||||
|       run_suite 'make pylint' 'pylint' | ||||
|       ;; | ||||
|     shlint) | ||||
|       run_suite 'make shlint' 'shlint' | ||||
|       ;; | ||||
|     single-includes) | ||||
|       run_suite 'make check-single-includes' 'single-includes' | ||||
|       ;; | ||||
|     *) | ||||
|       :;; | ||||
|   esac | ||||
|  | ||||
|   end_tests | ||||
| fi | ||||
|   | ||||
| @@ -8,6 +8,8 @@ source "${CI_DIR}/common/build.sh" | ||||
| source "${CI_DIR}/common/test.sh" | ||||
| source "${CI_DIR}/common/suite.sh" | ||||
|  | ||||
|  | ||||
| if [[ "$GITHUB_ACTIONS" != "true" ]]; then | ||||
|   run_suite 'build_nvim' 'build' | ||||
|  | ||||
|   if test "$CLANG_SANITIZER" != "TSAN"; then | ||||
| @@ -22,3 +24,26 @@ run_suite run_oldtests oldtests | ||||
|   run_suite install_nvim install_nvim | ||||
|  | ||||
|   end_tests | ||||
| else | ||||
|   case "$1" in | ||||
|     build) | ||||
|       run_suite 'build_nvim' 'build' | ||||
|       ;; | ||||
|     unittests) | ||||
|       run_suite 'run_unittests' 'unittests' | ||||
|       ;; | ||||
|     functionaltests) | ||||
|       run_suite 'run_functionaltests' 'functionaltests' | ||||
|       ;; | ||||
|     oldtests) | ||||
|       run_suite 'run_oldtests' 'oldtests' | ||||
|       ;; | ||||
|     install_nvim) | ||||
|       run_suite 'install_nvim' 'install_nvim' | ||||
|       ;; | ||||
|     *) | ||||
|       :;; | ||||
|   esac | ||||
|  | ||||
|   end_tests | ||||
| fi | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dundar Göc
					Dundar Göc