test: add unit tests for sync-docs-from-node workflow scripts #333
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)