Daily Test Coverage Improver - Fix coverage steps configuration for CI environment#252
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
- Upgrade Node.js from v18 to v20 to meet Vite 7.x requirements - Switch from jsdom to happy-dom for better CI environment compatibility - Add happy-dom to installed dependencies - Configure hosts file setup for DNS resolution in CI (requires sudo) Changes address DNS resolution errors and Node version warnings seen in coverage-steps.log. The happy-dom environment is lighter and more compatible with containerized CI environments that may have DNS resolution limitations.
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
The coverage steps configuration in
.github/actions/daily-test-improver/coverage-steps/action.ymlis failing in CI with two critical issues:Error: getaddrinfo EAI_AGAIN localhostdue to missing/etc/hostsfile in some CI environmentsFrom
coverage-steps.log:Solution
This PR updates the coverage steps action to:
1. Upgrade Node.js to v20
node-version: '18'tonode-version: '20'to meet Vite requirements2. Add hosts file setup step
/etc/hostsif missing in CI environment127.0.0.1and::1tolocalhost3. Switch to happy-dom environment
jsdomtohappy-domhappy-domto installed npm dependenciesTesting Needed
This PR should be tested in the actual GitHub Actions CI environment to verify:
/etc/hostssetup step completes successfully (may need sudo permissions)coverage/js/Reproducibility
To test coverage generation after these changes:
Alternative Approaches Considered
If the hosts file setup fails due to permission issues:
127.0.0.1instead oflocalhostHOST=0.0.0.0before running tests--network=hostin Docker-based CIImpact