ci: Set TZ in coverage job to fix coveralls reporter - #1673
Merged
Conversation
The coverage job runs in mcr.microsoft.com/dotnet/sdk:10.0, which ships a malformed timezone config: /etc/timezone contains "/UTC" and /etc/localtime points at /usr/share/zoneinfo//UTC. The coveralls reporter is a Crystal binary. Time::Location.load_local reads /etc/timezone, gets "/UTC" and raises InvalidLocationNameError because a location name may not start with "/", so the upload step aborts with exit 1: #<Time::Location::InvalidLocationNameError:Invalid location name: /UTC> coverallsapp/github-action is pinned to v2.3.8, but it downloads the latest reporter at run time, so this started without any change in this repo. The last green run was 2026-08-13 20:06 UTC; coverage-reporter v0.6.18 was published 2026-08-13 22:33 UTC. Every run since fails. Setting TZ skips the /etc/timezone lookup entirely. Verified by running the reporter against a real coverage.info inside the image: it crashes without TZ and proceeds to upload with TZ=UTC. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BX2NY9ozmWKHsifii1KYP
Coverage Report for CI Build 33165258633Warning No base build found for commit Coverage: 85.393%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every PR — and
mainitself — has been failing thecoveragejob since 2026-08-13.dotnet testpasses; the failure is one step later, in the coveralls upload:Root cause
The
coveragejob runs incontainer: mcr.microsoft.com/dotnet/sdk:10.0, which ships a malformed timezone config:The coveralls reporter is a Crystal binary.
Time::Location.load_localreads/etc/timezone, gets/UTC, and raisesInvalidLocationNameError— a location name may not start with/. Unhandled, so exit 1.coverallsapp/github-actionis pinned tov2.3.8, but the action downloads the latest reporter at run time, so this broke with no change in this repo:main.ymlruncoverage-reporterv0.6.18 releasedFix
Set
TZ: UTCon the job. Crystal short-circuits onTZand never reads/etc/timezone.Verification
Reproduced locally by running the reporter against a real
coverage/coverage.infoinsidemcr.microsoft.com/dotnet/sdk:10.0:TZ→InvalidLocationNameError, exit 1 (identical to CI)TZ=UTC→ proceeds all the way to the upload (fails only on a deliberately dummy repo token)dotnet test /p:CollectCoverage=truealso passes locally against a Postgres 17 container (67.88% total), confirming the test/DB path was never the problem.Not covered by this PR
Two unrelated failures found while investigating — these stay red after this fix:
chore: Bump the xunit group with 2 updates #1672 (xunit bump) fails inside
dotnet test:microsoft.testing.platform.msbuild2.3.3 errors with "Testing with VSTest target is no longer supported by Microsoft.Testing.Platform on .NET 10 SDK and later." This collides withtest/Directory.Build.props, which opts out viaTestingPlatformDotnetTestSupport=false/UseMicrosoftTestingPlatformRunner=false. Needs a real migration to the MTPdotnet testexperience.A flaky test —
JobWorkerBaseTest.AddFailedProgressAsync_ShouldAddFailedProgresfailed on chore: Bump Roslynator.Analyzers and 2 others #1667 with "Unable to set job items because no job repository is set." It's a race, not a roslynator problem:StartAsyncreturns as soon asExecuteAsynchits its firstawait, so the test can callCallAddFailedProgressAsync(7)before the background loop has fetched the job and set the repo. The siblingSetTotalItemsAsync_ShouldThrowInvalidOperationException_WhenNoCurrentJobIsSetis already[Skip]ped for what looks like the same reason.🤖 Generated with Claude Code
https://claude.ai/code/session_015BX2NY9ozmWKHsifii1KYP