Skip to content

Add CI workflow and development best practices from template#6

Merged
konard merged 4 commits intomainfrom
issue-5-6ad76e6429cf
Dec 28, 2025
Merged

Add CI workflow and development best practices from template#6
konard merged 4 commits intomainfrom
issue-5-6ad76e6429cf

Conversation

@konard
Copy link
Member

@konard konard commented Dec 27, 2025

Summary

This PR implements the requirements from issue #5 by:

Changes

CI/CD Workflow (.github/workflows/release.yml)

  • Changeset validation on pull requests
  • Linting and formatting checks
  • Code duplication checks
  • Multi-platform unit testing (Ubuntu, macOS, Windows)
  • Automated release workflow with npm publishing support via OIDC trusted publishing

Development Tools

  • Changeset - Version management with automated changelog generation
  • Prettier - Consistent code formatting across the codebase
  • ESLint - Code quality with Prettier integration
  • jscpd - Code duplication detection
  • Husky + lint-staged - Pre-commit hooks for automatic linting and formatting

Configuration Files Added

File Purpose
.changeset/config.json Changeset configuration
.github/workflows/release.yml CI/CD workflow
.prettierrc, .prettierignore Prettier configuration
.jscpd.json Code duplication settings
eslint.config.js ESLint configuration
.husky/pre-commit Pre-commit hook
bunfig.toml, deno.json Multi-runtime support
CHANGELOG.md Version history

NPM Scripts Added

  • format, format:check - Code formatting
  • check:duplication - Code duplication check
  • check - Run all checks (lint + format + duplication)
  • changeset, changeset:version, changeset:publish, changeset:status - Version management

Release Scripts (scripts/)

  • validate-changeset.mjs - Validate changeset in PRs
  • version-and-commit.mjs - Version bump and commit
  • publish-to-npm.mjs - Publish to npm
  • create-github-release.mjs - Create GitHub release
  • format-github-release.mjs - Format release notes
  • And more...

Code Quality Fixes

  • Formatted all 52 files with Prettier
  • Fixed duplicate import in src/bindings.js
  • Fixed page reference bug in tests/helpers/mocks.js

Test Plan

  • All 337 unit tests pass locally
  • ESLint passes (0 errors, 64 warnings)
  • Prettier check passes
  • Code duplication check passes
  • CI workflow runs successfully on this PR

Issue Reference

Fixes #5


🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #5
@konard konard self-assigned this Dec 27, 2025
This commit implements the requirements from issue #5 by adding:

## CI/CD Workflow
- GitHub Actions workflow for tests on push to main and PRs
- Changeset validation on pull requests
- Linting and formatting checks
- Code duplication checks
- Multi-platform testing (Ubuntu, macOS, Windows)
- Automated release workflow with npm publishing support

## Development Tools
- Changeset configuration for version management
- Prettier for consistent code formatting
- ESLint with Prettier integration
- jscpd for code duplication detection
- Husky pre-commit hooks with lint-staged

## Configuration Files
- .changeset/ - Version management configuration
- .github/workflows/release.yml - CI/CD workflow
- .prettierrc, .prettierignore - Prettier configuration
- .jscpd.json - Code duplication settings
- eslint.config.js - ESLint configuration
- .husky/pre-commit - Pre-commit hook
- bunfig.toml, deno.json - Multi-runtime support
- CHANGELOG.md - Version history

## Scripts Added
- format, format:check - Code formatting
- check:duplication - Code duplication check
- check - Run all checks
- changeset commands - Version management
- Release scripts for automated publishing

## Code Quality Fixes
- Formatted all files with Prettier
- Fixed duplicate import in bindings.js
- Fixed page reference bug in test mocks

Fixes #5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Make sure tests are executed in CI for both push to default branch and on Pull Requests Add CI workflow and development best practices from template Dec 27, 2025
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard marked this pull request as ready for review December 27, 2025 22:28
@konard
Copy link
Member Author

konard commented Dec 27, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $10.124603 USD
  • Calculated by Anthropic: $7.209552 USD
  • Difference: $-2.915051 (-28.79%)
    📎 Log file uploaded as GitHub Gist (1079KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 048dd62 into main Dec 28, 2025
8 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.

Make sure tests are executed in CI for both push to default branch and on Pull Requests

1 participant