Skip to content

Comments

Add CI/CD workflow#5

Merged
ikjeong merged 26 commits intomainfrom
feat/ci-cd
Nov 4, 2025
Merged

Add CI/CD workflow#5
ikjeong merged 26 commits intomainfrom
feat/ci-cd

Conversation

@ikjeong
Copy link
Contributor

@ikjeong ikjeong commented Nov 4, 2025

CI/CD Pipeline Setup

Summary

Adds complete CI/CD pipeline with automatic release and npm publishing.

Changes

CI/CD Workflows

  • ci.yml: Lint, test, and build on pull requests
  • build.yml: Multi-platform binary builds (5 platforms)
  • release.yml: Automatic GitHub releases and npm publishing

Code Fixes

  • Fix AST engine test: handle empty file list correctly
  • Fix errcheck violations: add error handling for json.Encoder, fmt.Sscanf
  • Add --version command
  • Remove duplicate mcp command registration
  • Clean up go.mod duplicate dependency
  • Remove .golangci.yml (use defaults)

npm Package

  • Focus on implemented features only

Binary Embedding

  • All platform binaries embedded in npm package (~20MB)
  • No download required during installation
  • Supports macOS (Intel/ARM), Linux (x64/ARM64), Windows (x64)

MCP Installation

After release, users can install with:

claude mcp add symphony npx @dev-symphony/sym@latest mcp

Requirements

  • NPM_TOKEN secret must be configured in repository settings

Test Results

  • go vet: PASS
  • go test -short: PASS (0 failures)
  • golangci-lint: PASS
  • Multi-platform builds: SUCCESS (5 binaries)

- Add build workflow for cross-platform compilation
- Add CI workflow with lint, test, and build stages
- Add release workflow with automated publishing
- Configure golangci-lint with comprehensive rules
- Update Go version to 1.25.1 across workflows
- Implement caching for faster CI runs
- Add GPG signing for release binaries
- Integrate govulncheck for security scanning
- Add npm package for easy distribution
- Implement Chrome DevTools MCP-style installation
- Add comprehensive MCP documentation and API guide
- Create MCP E2E test script
- Add release template for future releases
- Update main README with MCP installation guide
- Update Makefile with CSS build targets for dashboard

Installation:
  claude mcp add symphony npx @devsymphony/sym@latest mcp
- Remove E2E test execution from CI workflow
- Keep coverage reporting and artifact upload
- Add SYM_BINARY env var support to mcp_test.sh for local testing
- Add -short flag to skip integration tests
- Remove Codecov upload step (keep local coverage reports)
- Simplify test matrix to single Go version (1.25.1)
- Keep coverage.out and coverage.html as GitHub artifacts
- Add actions: write permission for artifact upload
- Set artifact retention-days to 1 (reduce storage from 90 days)
- Saves ~178MB storage per month (2MB × 89 days)
- Merge 'Build binary' and 'Verify binary' into single step
- Remove binary size check (go build validates correctness)
- Remove integration test step (unnecessary duplication)
- Remove redundant BINARY_NAME calculation
- Use exact artifact path instead of glob pattern
- Reduce from 130 lines to 78 lines (-52 lines, -40%)
- Remove compression step (tar.gz) from release assets
- Remove GPG signing steps (Import + Sign)
- Simplify npm job to 3 steps (remove verification/checks)
- Add -short flag to deploy-coverage tests (unit tests only)
- Reduce from 227 lines to 142 lines (-85 lines, -37%)
- Add workflow_call to ci.yml for reusability
- Add ci job to release.yml (runs before build)
- Update job dependencies to require CI success
- Replace test execution in deploy-coverage with artifact download
- Eliminate duplicate test runs (2 → 1)
- Reduce release.yml from 142 to 139 lines
- Update package.json: @devsymphony/sym → @dev-symphony/sym
- Update error messages in npm/bin/sym.js
- Add npm/bin/ to git (was ignored by .gitignore)
- Enable MCP installation: claude mcp add sym npx @dev-symphony/sym mcp
- Update @devsymphony/sym → @dev-symphony/sym in README.md (3 places)
- Update @devsymphony/sym → @dev-symphony/sym in npm/README.md (11 places)
- Ensure consistency across all documentation
- Comment out deploy-coverage job (GitHub Pages not needed)
- Modify npm job to download and copy build artifacts to npm/bin/
- Remove postinstall script (no longer downloading from GitHub Releases)
- Remove npm/lib/install.js (binaries now embedded in package)
- Support private repository: ~20MB package with all platform binaries
- Change default port from 4000 to 0 for stdio mode
- MCP protocol requires stdio communication by default
- HTTP mode still available with --port flag
- Simplify binary path resolution in npm wrapper
- Track only *.js files in npm/bin/ (source code)
- Ignore sym-* binaries (build artifacts)
- Binaries are generated by Release workflow
- npm package includes binaries via files array
Critical fixes:
- Fix Go version parsing in ci.yml (add quotes to prevent version truncation)
- Add fetch-depth: 0 to fetch all tags (prevent duplicate release attempts)
- Add binary count verification (5 binaries) before release and npm publish
- Prevent empty package publishing with explicit validation

Improvements:
- Add explicit Node.js version (20) for version extraction
- Make npm job depend on release job (proper sequencing)
- Add detailed error messages for debugging

This ensures:
- Correct Go version installation
- Accurate duplicate release detection
- No empty packages published to npm
- Better workflow debugging
Critical fixes:
- Move build job inline in release.yml (workflow_call artifacts not shared)
- Add main.Version variable for version embedding in binaries
- Fix golangci-lint version (latest → v1.62.2 for stability)
- Add build job dependencies (needs: [lint, test])

This ensures:
- Release and npm jobs can access build artifacts (was 100% failing)
- Binary version information is correctly embedded
- Consistent linter behavior across runs
- Build only runs after lint and test pass

Breaking change:
- build.yml no longer called from release.yml (inlined instead)
- Artifacts now properly shared within same workflow
- Fix AST engine test: handle empty file list before init check
- Fix errcheck violations: add error handling for json.Encoder, fmt.Sscanf
- Clean up go.mod: remove duplicate dependency
- Add version command: implement --version flag
- Remove duplicate mcp command registration
- Simplify linter config: delete .golangci.yml, use defaults
- Remove unused E2E test script
@ikjeong ikjeong self-assigned this Nov 4, 2025
@ikjeong ikjeong merged commit 6c89372 into main Nov 4, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant