From ae3dd35beea81e4bb9c995d8a240e031b2a096d8 Mon Sep 17 00:00:00 2001 From: Don Cross Date: Tue, 12 Apr 2022 20:12:05 -0400 Subject: [PATCH] GitHub Actions did not check failure in run.bat. I just noticed a build problem in the Kotlin code was detected by GitHub Actions in Linux and Mac OS, but not in Windows. It marked the Windows test as a success, even though the output clearly shows that run.bat failed. I theorize that the steps inside the file .github/workflows/astronomy-engine-tests.yml are not being checked for errors after each step, but only after all of them execute. So I have moved them into a new batch file generate/commit_hook.bat, which does check each step. After pushing this change, all 3 builds should fail. Once I get Windows to fail also, I will fix the failure. --- .github/workflows/astronomy-engine-tests.yml | 4 +--- generate/commit_hook.bat | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 generate/commit_hook.bat diff --git a/.github/workflows/astronomy-engine-tests.yml b/.github/workflows/astronomy-engine-tests.yml index 69753ece..7e6f0c7b 100644 --- a/.github/workflows/astronomy-engine-tests.yml +++ b/.github/workflows/astronomy-engine-tests.yml @@ -97,6 +97,4 @@ jobs: shell: cmd run: | cd generate - del output\vsop*.txt output\*.eph output\jupiter_moons.txt - call run.bat - call verify_clean.bat + call commit_hook.bat diff --git a/generate/commit_hook.bat b/generate/commit_hook.bat new file mode 100644 index 00000000..a769f20d --- /dev/null +++ b/generate/commit_hook.bat @@ -0,0 +1,7 @@ +@echo off +del output\vsop*.txt output\*.eph output\jupiter_moons.txt +call run.bat +if errorlevel 1 (exit /b 1) +call verify_clean.bat +if errorlevel 1 (exit /b 1) +exit /b 0