summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2024-01-16 23:24:39 +1100
committerGitHub <noreply@github.com>2024-01-16 23:24:39 +1100
commit8062f96d6b36dd237a2243119a38919688145229 (patch)
tree0b76029cb764863575eea558d9483f330f61fd8d
parent53acbc8f18abed06c1245f8df47d7035893f32a2 (diff)
parentcf59b40a1b91735c4e2ece93f377c97b4eb892d7 (diff)
Fix CI erroneously marking failed tests as successful (#3221)
CI is erroneously saying that our integration tests are passing. As @stefanhaller says in a comment: > It broke with this commit: https://github.com/jesseduffield/lazygit/commit/aaecd6cc40d8ffe07eb3c2cdbed5bf908787bc8b. Since that change, the run_integration_tests.sh script will exit with the exit status of the the last mv command, not the test run. Should be pretty easy to fix. Thanks to Stefan for fixing this (The reason I'm saying this all here in the PR description is that PR descriptions now get included in merge commits)
-rwxr-xr-xscripts/run_integration_tests.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/run_integration_tests.sh b/scripts/run_integration_tests.sh
index e94d47786..d7c45257d 100755
--- a/scripts/run_integration_tests.sh
+++ b/scripts/run_integration_tests.sh
@@ -18,6 +18,7 @@ if [ -n "$LAZYGIT_GOCOVERDIR" ]; then
# arg, but if we do that then the GOCOVERDIR env var (which you typically pass to the test binary) will be overwritten by the test runner. So we're passing LAZYGIT_COCOVERDIR instead
# and then internally passing that to the test binary as GOCOVERDIR.
go test -cover -coverpkg=github.com/jesseduffield/lazygit/pkg/... pkg/integration/clients/*.go -args -test.gocoverdir="/tmp/code_coverage"
+ EXITCODE=$?
# We're merging the coverage data for the sake of having fewer artefacts to upload.
# We can't merge inline so we're merging to a tmp dir then moving back to the original.
@@ -27,10 +28,9 @@ if [ -n "$LAZYGIT_GOCOVERDIR" ]; then
mv /tmp/code_coverage_merged /tmp/code_coverage
else
go test pkg/integration/clients/*.go
+ EXITCODE=$?
fi
-EXITCODE=$?
-
if test -f ~/.gitconfig.lazygit.bak; then
mv ~/.gitconfig.lazygit.bak ~/.gitconfig
fi