Overview of CI Validation
The validation workflow runs automatically when:Pull Requests
Any PR targeting the
main branch that modifies JSON filesDirect Pushes
Any push to the
main branch that modifies JSON files*.json(root level JSON files)palettes/**/*.json(JSON files in palettes directory)
CI Workflow Structure
The complete workflow is defined in.github/workflows/validate-schema.yml:
Validation Checks Explained
Check 1: JSON Schema Validation
- What It Checks
- Implementation
- Common Failures
Validates that
color-palettes.json conforms to the defined schema in schema.json.Validation Rules:Protocol Name Format
Protocol Name Format
Pattern:
^[A-Za-z0-9\\s\\-_().₮]+$Valid Examples:- ✅
"Ethereum" - ✅
"Polygon zkEVM" - ✅
"1inch" - ✅
"USD₮"
- ❌
"Protocol/Name"(contains/) - ❌
"Protocol@Chain"(contains@) - ❌
"Protocol#1"(contains#)
Hex Color Format
Hex Color Format
Pattern:
^#[0-9A-Fa-f]{6}$Valid Examples:- ✅
"#627EEA" - ✅
"#FF007A" - ✅
"#000000"
- ❌
"627EEA"(missing#prefix) - ❌
"#627"(too short) - ❌
"#627EEAFF"(too long - no alpha) - ❌
"#GG0000"(invalid hex characters)
Aliases Array Format
Aliases Array Format
Requirements:
- Must be an array
- Minimum 1 item
- All items must be unique
- Each item matches:
^[a-zA-Z0-9_\\s.₮-]+$
- ✅
["ethereum", "eth", "weth"] - ✅
["polygon"] - ✅
["usd-tether-0"]
- ❌
[](empty array) - ❌
["eth", "eth"](duplicates) - ❌
["eth/weth"](invalid character/)
Required Fields
Required Fields
Every protocol entry must include:Invalid Examples:
"hex"(string)"aliases"(array)
Check 2: Duplicate Alias Detection
- What It Checks
- Implementation
- Case Sensitivity
- Common Failures
Ensures no alias is used by multiple protocols, using case-insensitive comparison.Detection Logic:CI Output:
- Extracts all aliases from all protocols
- Converts each alias to lowercase
- Tracks which protocol “owns” each lowercase alias
- Fails if any alias appears in multiple protocols
Interpreting CI Results
Successful Validation
When all checks pass, you’ll see:Your pull request is ready for maintainer review!
Failed Validation
When checks fail, you’ll see specific error messages:- Schema Validation Failure
- Duplicate Alias Failure
- Multiple Failures
- Read the error message carefully
- Identify the problematic path (e.g.,
/Ethereum/hex) - Check the value against the schema requirements
- Fix the issue in your
color-palettes.json - Commit and push the fix
Troubleshooting CI Failures
CI Won't Run
CI Won't Run
Symptoms: No CI checks appear on your PRPossible Causes:
- You didn’t modify any JSON files
- Changes are in a different directory
- Branch protection not configured
- Ensure you modified
color-palettes.jsonor files inpalettes/**/*.json - Check the “Files changed” tab in your PR
- Verify the workflow file exists in
.github/workflows/
CI Stuck on 'Pending'
CI Stuck on 'Pending'
Symptoms: CI checks show “Expected — Waiting for status to be reported”Possible Causes:
- GitHub Actions queue delay
- Workflow requires approval (first-time contributors)
- Repository Actions disabled
- Wait a few minutes for the queue
- Ask a maintainer to approve workflow run
- Check if Actions are enabled in repository settings
Can't Understand Error Message
Can't Understand Error Message
Symptoms: CI fails but error message is unclearSolutions:
- Click “Details” next to the failed check
- Expand the failed step to see full logs
- Copy the exact error message
- Search documentation or existing issues
- Comment on your PR asking for clarification
Maintainers are happy to help interpret CI errors. Include the full error message in your comment.
Fixed but CI Still Fails
Fixed but CI Still Fails
Symptoms: Made changes but CI shows same errorPossible Causes:Check the commit SHA in the PR to ensure CI is running on your latest commit.
- Changes not committed
- Changes not pushed
- CI running on old commit
CI Passes Locally but Fails in GitHub
CI Passes Locally but Fails in GitHub
Symptoms: Local validation passes but CI failsPossible Causes:
- Different versions of tools (jq, etc.)
- Line ending differences (Windows vs. Unix)
- Testing different file
- Ensure you’re testing the exact same file
- Check for whitespace or encoding issues
- Trust CI results over local tests
- Review the CI logs for specific differences
Running Validation Locally
You can run the same checks locally before submitting:1
Install Required Tools
- macOS
- Linux
- Windows
2
Validate JSON Schema
3
Check for Duplicate Aliases
Best Practices for Passing CI
Validate Before Committing
Run local validation before every commit to catch issues early
Follow the Schema Exactly
Don’t add extra fields or use different formats than specified
Check for Existing Aliases
Search the JSON file before adding new aliases to avoid conflicts
Use Automated Formatting
Format your JSON with
jq or your editor’s formatterGetting Help
If you’re stuck with CI failures:- Read the error message carefully - it usually tells you exactly what’s wrong
- Check this documentation for explanations and solutions
- Review Contribution Guidelines for best practices
- Search existing issues and PRs for similar problems
- Comment on your PR asking for help (include the full error message)
CI checks are designed to help you, not block you. When they fail, they’re providing valuable feedback to improve your contribution.