test: add unit tests for sync-docs-from-node workflow scripts#333
Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Closed
test: add unit tests for sync-docs-from-node workflow scripts#333devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Add bats-core unit tests for the shell scripts used by the documentation sync workflow to prevent regressions when updating the docs. Tests cover: - version-utils.sh: validate_version function with various SemVer formats - sanitize-config.sh: config sanitization (RPC URL replacement, dev removal) - sanitize-docker-compose.sh: docker-compose sanitization (alloy removal) - sync.sh: file sync logic (add/update/delete, pattern filtering, exclusions) - aggregate-reports.sh: report aggregation and metric calculation Also adds a new GitHub workflow (test-workflow-scripts.yml) that runs these tests on PRs that modify the workflow scripts or actions. Co-Authored-By: Agustín Díaz <agustin.ramiro.diaz@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for genlayer-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Contributor
|
closing since it's not what I wanted |
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.
Description
Adds unit tests for the shell scripts used by the documentation sync workflow (
sync-docs-from-node.yml) to prevent regressions when updating the docs synchronization logic.Changes
New test files (using bats-core):
version-utils.bats- 18 tests for version validation (SemVer formats, prerelease, build metadata)sanitize-config.bats- 6 tests for config sanitization (RPC URL replacement, dev section removal)sanitize-docker-compose.bats- 6 tests for docker-compose sanitization (alloy service removal)sync.bats- 19 tests for file sync logic (add/update/delete, pattern filtering, exclusions, .md→.mdx conversion)aggregate-reports.bats- 8 tests for report aggregation and metric calculationNew workflow:
test-workflow-scripts.yml- Runs tests on PRs that modify workflow scripts, actions, or testsTest Results (Local)
All 57 tests pass locally.
Review Checklist
.github/scripts/**,.github/actions/**,.github/tests/**)GITHUB_OUTPUTfor local executionLink to Devin run: https://app.devin.ai/sessions/477feda674684f5cbd3e51c4fef25e52
Requested by: Agustín Díaz (@AgustinRamiroDiaz)