Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Nov 30, 2023
1 parent 850143e commit 035225c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ jobs:
echo "Coverage directories: $COVERAGE_DIRS"
# Run the combine command with the generated list
go tool covdata textfmt -i=$COVERAGE_DIRS -o coverage.out
echo "Combined coverage:"
go tool cover -func coverage.out | tail -1 | awk '{print $3}'
- name: Upload to Codacy
# Don't run on forks
Expand Down
15 changes: 2 additions & 13 deletions scripts/run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,14 @@ if [ -n "$LAZYGIT_GOCOVERDIR" ]; then
# test runner's coverage data to /tmp/code_coverage_test_runner, then merge the two coverage files
# back into /tmp/code_coverage

mkdir -p /tmp/code_coverage_test_runner
mkdir -p /tmp/code_coverage_merged

go test -cover -coverpkg=github.com/jesseduffield/lazygit/pkg/... pkg/integration/clients/*.go -args -test.gocoverdir="/tmp/code_coverage_test_runner"
go test -cover -coverpkg=github.com/jesseduffield/lazygit/pkg/... pkg/integration/clients/*.go -args -test.gocoverdir="/tmp/code_coverage"

echo "contents of /tmp/code_coverage before merge:"
ls /tmp/code_coverage

echo "contents of /tmp/code_coverage_test_runner before merge:"
ls /tmp/code_coverage_test_runner

go tool covdata merge -i=/tmp/code_coverage,/tmp/code_coverage_test_runner -o=/tmp/code_coverage_merged
go tool covdata merge -i=/tmp/code_coverage -o=/tmp/code_coverage_merged

rm -rf /tmp/code_coverage
mv /tmp/code_coverage_merged /tmp/code_coverage

echo "contents of /tmp/code_coverage after merge:"
ls /tmp/code_coverage

else
go test pkg/integration/clients/*.go
fi
Expand Down

0 comments on commit 035225c

Please sign in to comment.