Skip to content

Commit

Permalink
Fix CI erroneously marking failed tests as successful (jesseduffield#…
Browse files Browse the repository at this point in the history
…3221)

CI is erroneously saying that our integration tests are passing.

As @stefanhaller says in a comment:
> It broke with this commit:
jesseduffield@aaecd6c.
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)
  • Loading branch information
jesseduffield committed Jan 16, 2024
2 parents 53acbc8 + cf59b40 commit 8062f96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 8062f96

Please sign in to comment.