Skip to content

Commit fab39c7

Browse files
km-kwonclaude
andcommitted
chore: integrate GitHub Actions and implement comprehensive test suite (v1.0.2)
- Add GitHub Actions CI/CD workflows for automated testing and publishing - Implement comprehensive test suite with Vitest and React Testing Library - 108 test cases with 99.2% code coverage - Tests for CircularBuffer, BufferManager, and useCircularBuffer hook - Integrate Codecov for coverage reporting and tracking - Add status badges to README (npm, license, CI, coverage) - Update development dependencies for testing infrastructure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent bdfd48a commit fab39c7

15 files changed

Lines changed: 5014 additions & 18 deletions

.claude/settings.local.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npm install:*)",
5+
"Bash(npm test:*)",
6+
"Bash(npx vitest:*)",
7+
"Bash(node -e:*)"
8+
]
9+
}
10+
}

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [18, 20, 22]
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Run tests
34+
run: npm test
35+
36+
- name: Build
37+
run: npm run build
38+
39+
coverage:
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
46+
- name: Setup Node.js
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: '20'
50+
51+
- name: Install dependencies
52+
run: npm ci
53+
54+
- name: Run tests with coverage
55+
run: npm run test:coverage
56+
57+
- name: Upload coverage to Codecov
58+
uses: codecov/codecov-action@v4
59+
with:
60+
files: ./coverage/coverage-final.json
61+
flags: unittests
62+
name: codecov-umbrella
63+
fail_ci_if_error: false
64+
env:
65+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
registry-url: 'https://registry.npmjs.org'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Run tests
29+
run: npm test
30+
31+
- name: Build
32+
run: npm run build
33+
34+
- name: Publish to npm
35+
run: npm publish --provenance --access public
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.0.2] - 2025-12-24
8+
9+
### Added
10+
- Integrated GitHub Actions CI/CD workflows
11+
- Automated testing on push and pull requests
12+
- Multi-version Node.js testing (18, 20, 22)
13+
- Automated npm publishing on version tags
14+
- Comprehensive test suite with Vitest and React Testing Library
15+
- 108 test cases covering all functionality
16+
- 99.2% code coverage
17+
- Tests for CircularBuffer, BufferManager, and useCircularBuffer hook
18+
- Codecov integration for coverage reporting
19+
- Status badges in README (npm version, license, CI status, coverage)
20+
21+
### Changed
22+
- Updated development dependencies for testing infrastructure
23+
- Improved CI/CD pipeline with automated quality checks
24+
725
## [1.0.1] - 2025-12-23
826

927
### Changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# circular-queue-react
22

3-
High-performance circular buffer/queue for TypeScript and React.
3+
[![npm version](https://img.shields.io/npm/v/circular-queue-react.svg)](https://www.npmjs.com/package/circular-queue-react)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![CI](https://github.com/km-kwon/react-circular-queue/actions/workflows/ci.yml/badge.svg)](https://github.com/km-kwon/react-circular-queue/actions/workflows/ci.yml)
6+
[![codecov](https://codecov.io/gh/km-kwon/react-circular-queue/branch/master/graph/badge.svg)](https://codecov.io/gh/km-kwon/react-circular-queue)
7+
8+
High-performance circular buffer/queue for TypeScript and React.
49
Zero dependencies (**React optional**) — perfect for logs, streaming data, rolling windows, and real-time UI updates.
510

611
---

0 commit comments

Comments
 (0)