Skip to content

Commit

Permalink
GitHub Actions did not check failure in run.bat.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cosinekitty committed Apr 13, 2022
1 parent 5052920 commit ae3dd35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/astronomy-engine-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions generate/commit_hook.bat
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ae3dd35

Please sign in to comment.