Skip to content

Commit 61f00fc

Browse files
authored
Merge pull request #1 from bhouston/ci-cd-workflow
Add ci/cd workflow
2 parents afb3d66 + ce845e8 commit 61f00fc

16 files changed

+2762
-2266
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
ci:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- uses: pnpm/action-setup@v2
21+
with:
22+
version: 10.2.1
23+
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: 18
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Build
32+
run: pnpm build:ci
33+
34+
- name: Test
35+
run: pnpm test

COMMIT_CONVENTION.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Commit Message Convention
2+
3+
This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages. This helps automatically determine version numbers and generate changelogs.
4+
5+
## Format
6+
7+
```
8+
<type>(<scope>): <description>
9+
10+
[optional body]
11+
12+
[optional footer(s)]
13+
```
14+
15+
### Types
16+
17+
- `feat!:` or `fix!:` - Breaking change (triggers major version bump)
18+
- `feat:` - A new feature (triggers minor version bump)
19+
- `fix:` - A bug fix (triggers patch version bump)
20+
- `docs:` - Documentation only changes
21+
- `style:` - Changes that do not affect the meaning of the code
22+
- `refactor:` - A code change that neither fixes a bug nor adds a feature
23+
- `perf:` - A code change that improves performance
24+
- `test:` - Adding missing tests or correcting existing tests
25+
- `chore:` - Changes to the build process or auxiliary tools
26+
27+
### Examples
28+
29+
```
30+
feat(api): add new endpoint for user authentication
31+
32+
This new endpoint allows users to authenticate using OAuth2.
33+
34+
BREAKING CHANGE: `auth` endpoint now requires OAuth2 token
35+
```
36+
37+
```
38+
fix(database): resolve connection timeout issue
39+
40+
Increased connection timeout from 5s to 15s
41+
```
42+
43+
```
44+
docs: update README with new API documentation
45+
```
46+
47+
## Changelog Generation
48+
49+
Commit messages are used to:
50+
1. Automatically determine the next version number
51+
2. Generate changelog entries
52+
3. Create GitHub releases
53+
54+
The process is automated through GitHub Actions and uses changesets for release management.

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ Key points:
1212

1313
```bash
1414
# Clone the repository
15-
git clone https://github.com/yourusername/mycoder.git
15+
git clone https://github.com/bhouston/mycoder.git
16+
17+
# Change directory
1618
cd mycoder
1719

1820
# Install dependencies
1921
pnpm install
2022

21-
# Create .env file with your API keys
22-
cp .env.example .env
23-
# Edit .env with your API keys
23+
# Create a .env with your API key
24+
echo "ANTHROPIC_API_KEY=[your-api-key]" > .env
2425
```
2526

2627
### Development Commands

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,25 @@ These examples showcase MyCoder's ability to handle complex software development
124124

125125
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for our development workflow, coding guidelines, and testing procedures.
126126

127+
## Development Workflow
128+
129+
### Commit Messages
130+
131+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) for commit messages. See [COMMIT_CONVENTION.md](COMMIT_CONVENTION.md) for detailed guidelines.
132+
133+
### CI/CD Pipeline
134+
135+
The project uses GitHub Actions for continuous integration:
136+
137+
- A single CI pipeline automatically builds and tests the code on all branches and pull requests to main
138+
139+
The release process is managed manually using [changesets](https://github.com/changesets/changesets) which:
140+
1. Determines version bumps based on commit messages
141+
2. Generates changelogs
142+
143+
Releases to GitHub and publishing to npm are performed manually after review.
144+
145+
127146
## License
128147

129148
MIT License

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bin": "./bin/cli.js",
77
"main": "./dist/index.js",
88
"types": "./dist/index.d.ts",
9-
"packageManager": "pnpm@8.9.0",
9+
"packageManager": "pnpm@10.2.1",
1010
"engines": {
1111
"node": ">=18.0.0"
1212
},
@@ -21,11 +21,13 @@
2121
"scripts": {
2222
"start": "node --no-deprecation dist/index.js",
2323
"build": "tsc --noEmit && tsc",
24+
"build:ci": "tsc",
2425
"clean": "rimraf dist",
2526
"lint": "eslint \"src/**/*.ts\" --fix",
2627
"format": "prettier --write \"src/**/*.*\"",
2728
"test": "vitest run",
2829
"test:watch": "vitest",
30+
"test:ci": "vitest --run --coverage",
2931
"changeset": "changeset",
3032
"version": "changeset version",
3133
"prepublishOnly": "pnpm run clean && pnpm run build && pnpm run test"

0 commit comments

Comments
 (0)