chore(ci): prevent test log truncation in backend coverage workflows

- Install gotestsum in CI so the coverage script uses compact
  pkgname-formatted output instead of go test -v, which produces
  massive verbose logs that exceed GitHub Actions' step log buffer
- Upload the full test output as a downloadable artifact on every
  run (including failures) so truncated logs never block debugging
- Aligns upload-artifact pin to v7.0.0 matching the rest of the repo
This commit is contained in:
GitHub Actions
2026-03-22 18:49:02 +00:00
parent 97255f84e6
commit bae55fb876
2 changed files with 22 additions and 0 deletions

View File

@@ -126,6 +126,9 @@ jobs:
echo "__CHARON_EOF__"
} >> "$GITHUB_ENV"
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Run Go tests with coverage
working-directory: ${{ github.workspace }}
env:
@@ -134,6 +137,14 @@ jobs:
bash scripts/go-test-coverage.sh 2>&1 | tee backend/test-output.txt
exit "${PIPESTATUS[0]}"
- name: Upload test output artifact
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: backend-test-output
path: backend/test-output.txt
retention-days: 7
- name: Upload backend coverage to Codecov
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
with: