-
Notifications
You must be signed in to change notification settings - Fork 0
Fix validate-workflows.yml GitHub Actions workflow #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix validate-workflows.yml GitHub Actions workflow #5
Conversation
Co-authored-by: gejjech <[email protected]>
✅ All 286 n8n workflow files are valid! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the broken validate-workflows.yml
GitHub Actions workflow by creating a new Python validation script and simplifying the workflow configuration. The changes remove dependencies on non-existent tools and directories while maintaining proper JSON validation functionality.
- Creates a new
tools/validate_workflows.py
script that validates workflow JSON syntax and basic n8n structure - Removes dependency installation steps and calls to undefined
n8n-validate
/n8n-visualize
commands - Simplifies workflow by removing visualization generation and artifact upload functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
tools/validate_workflows.py | New Python validation script that checks JSON syntax and n8n workflow structure |
.github/workflows/validate-workflows.yml | Simplified workflow that uses the new validation script instead of missing dependencies |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
if len(nodes) == 0: | ||
return False, "Empty nodes array - workflow should have at least one node" |
Copilot
AI
Sep 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validation rule may be too strict. n8n allows workflows with empty nodes arrays as templates or incomplete workflows. Consider making this a warning rather than a hard error, or make it configurable via a command-line flag.
Copilot uses AI. Check for mistakes.
(is_valid, error_message) - error_message is None if valid | ||
""" | ||
try: | ||
with open(path, 'r', encoding='utf-8', errors='ignore') as f: |
Copilot
AI
Sep 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using errors='ignore'
silently discards encoding errors which could mask data corruption issues. Consider using errors='replace'
or errors='strict'
with proper error handling to ensure data integrity during validation.
with open(path, 'r', encoding='utf-8', errors='ignore') as f: | |
with open(path, 'r', encoding='utf-8') as f: |
Copilot uses AI. Check for mistakes.
The
validate-workflows.yml
GitHub Actions workflow was broken and could not run successfully due to several issues:Problems Fixed
Missing Dependencies & Directory Structure
./lib
directory for dependency installationrequirements.txt
filen8n-validate
andn8n-visualize
commands that don't exist in the repositoryOverly Complex Functionality
Solution
New Validation Script
tools/validate_workflows.py
that leverages the existing repository structurenodes
array)ALL_unique_nodes.json
,all_templates.json
)Simplified Workflow
Testing
The updated workflow has been tested and:
The workflow now uses only standard Python libraries and the existing repository structure, making it maintainable and reliable for continuous integration.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.