MCPcopy
hub / github.com/czlonkowski/n8n-mcp / runAllTests

Method runAllTests

scripts/test-release-automation.js:519–571  ·  view source on GitHub ↗

* Run all tests

()

Source from the content-addressed store, hash-verified

517 * Run all tests
518 */
519 async runAllTests() {
520 header('Release Automation Test Suite');
521
522 info('Testing release automation components...');
523
524 this.testFileExistence();
525 this.testVersionDetection();
526 this.testChangelogParsing();
527 this.testBuildProcess();
528 this.testNpmPublishPrep();
529 this.testDockerConfig();
530 this.testWorkflowSyntax();
531 this.testEnvironment();
532
533 // Summary
534 header('Test Summary');
535
536 if (this.errors.length === 0 && this.warnings.length === 0) {
537 log('🎉 All tests passed! Release automation is ready.', 'green');
538 } else {
539 if (this.errors.length > 0) {
540 log(`\n❌ ${this.errors.length} Error(s):`, 'red');
541 this.errors.forEach(err => log(` • ${err}`, 'red'));
542 }
543
544 if (this.warnings.length > 0) {
545 log(`\n⚠️ ${this.warnings.length} Warning(s):`, 'yellow');
546 this.warnings.forEach(warn => log(` • ${warn}`, 'yellow'));
547 }
548
549 if (this.errors.length > 0) {
550 log('\n🔧 Please fix the errors before running the release workflow.', 'red');
551 process.exit(1);
552 } else {
553 log('\n✅ No critical errors found. Warnings should be reviewed but won\'t prevent releases.', 'yellow');
554 }
555 }
556
557 // Next steps
558 log('\n📋 Next Steps:', 'cyan');
559 log('1. Ensure GitHub repository settings are configured:', 'cyan');
560 log(' • Secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN', 'cyan');
561 log(' • Environment "npm-publish" exists (Settings → Environments)', 'cyan');
562 log(' • npm Trusted Publisher configured on npmjs.com (no NPM_TOKEN secret needed)', 'cyan');
563 log(' • GITHUB_TOKEN is provided automatically', 'cyan');
564 log('\n2. To trigger a release:', 'cyan');
565 log(' • Update version in package.json', 'cyan');
566 log(' • Update changelog in docs/CHANGELOG.md', 'cyan');
567 log(' • Commit and push to main branch', 'cyan');
568 log('\n3. Monitor the release workflow in GitHub Actions', 'cyan');
569
570 return this.errors.length === 0;
571 }
572}
573
574// Run the tests

Callers 1

Calls 11

testFileExistenceMethod · 0.95
testVersionDetectionMethod · 0.95
testChangelogParsingMethod · 0.95
testBuildProcessMethod · 0.95
testNpmPublishPrepMethod · 0.95
testDockerConfigMethod · 0.95
testWorkflowSyntaxMethod · 0.95
testEnvironmentMethod · 0.95
headerFunction · 0.70
infoFunction · 0.70
logFunction · 0.70

Tested by

no test coverage detected