diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1779e486e..f8631bc4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,7 +99,10 @@ jobs: - name: Run unit tests id: run_tests1 run: | - exit build-ci/library/tests/test-library + if build-ci/library/tests/test-library; then + exit 0 + fi + exit 1 - name: Run lua tests id: run_tests2 run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 29103d495..a1965fe3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,6 +394,12 @@ else() endif() endif() +if(BUILD_TESTING) + message("BUILD TESTS: Core, Scripts") + set(BUILD_SCRIPT_TESTS ON FORCE) + set(BUILD_CORE_TESTS ON FORCE) +endif() + # Support linking against external tinyxml # If we find an external tinyxml, set the DFHACK_TINYXML variable to "tinyxml" # Otherwise, set it to "dfhack-tinyxml" @@ -409,12 +415,6 @@ else() set(DFHACK_TINYXML "dfhack-tinyxml") endif() -if(BUILD_TESTING) - message("BUILD TESTS: Core, Scripts") - set(BUILD_SCRIPT_TESTS ON FORCE) - set(BUILD_CORE_TESTS ON FORCE) -endif() - find_package(ZLIB REQUIRED) if(BUILD_CORE_TESTS)