diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a70f33a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Test + run: npm test diff --git a/README.md b/README.md index d500cfe..0740aa5 100644 --- a/README.md +++ b/README.md @@ -156,3 +156,13 @@ import { parse } from 'react-props-parser'; const doc = parse('./Button.tsx', { maxTypeNameLength: 80 }); ``` +## Branching strategy + +As this project is at early stage, I just push everything to main branch directly. I understand it's not feasible, and if I want it to improve as proper library, I need to follow correct rules. My main idea is having: + +- `main` - always in a working, releasable state. Nothing broken merges here. +- `feature/fix branches` - one per change, branched off `main`. + +All feature/fix branches can be merge back into `main` via PR. + +In addition, I plan to tag every published version, matching the npm version exactly.