This directory contains the GitHub Actions workflows and configurations for the i-clavdivs monorepo.
Main CI (ci.yml)
Runs on every push and pull request to ensure code quality and correctness.
Triggers:
- Push to
main,develop, or feature branches (F-*) - Pull requests to
mainordevelop - Manual workflow dispatch
Jobs:
- Lint & Format Check - Validates code formatting and runs linters
- Type Check - Runs TypeScript type checking across all packages
- Test - Runs test suites on Node.js 18 and 20
- Generates coverage reports on Node 20
- Uploads to Codecov (requires
CODECOV_TOKENsecret)
- Build - Compiles all packages and uploads artifacts
- CI Success - Final check to ensure all jobs passed
Optimizations:
- Uses
concurrencyto cancel outdated runs - Caches pnpm dependencies
- Runs jobs in parallel where possible
- Matrix strategy for testing multiple Node versions
PR Checks (pr-checks.yml)
Additional validations specifically for pull requests.
Jobs:
- PR Title Validation - Enforces conventional commit format
- Allowed types:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert - Subject must start with lowercase
- Allowed types:
- Changed Files Detection - Identifies which packages were modified
- Affected Tests - Runs tests for changed packages
- Bundle Size Check - Reports build artifact sizes
- Dependency Review - Scans for vulnerable dependencies
Release (release.yml)
Handles package versioning and publishing.
Triggers:
- Push of version tags (
v*) - Manual workflow dispatch with version input
Steps:
- Runs full test suite
- Builds all packages
- Creates GitHub Release with auto-generated notes
- (Optional) Publishes to npm - currently commented out
To enable npm publishing:
- Add
NPM_TOKENsecret to repository - Uncomment the publish step in the workflow
Auto-merge Dependabot (auto-merge.yml)
Automatically approves and merges minor/patch dependency updates from Dependabot.
Behavior:
- Only processes Dependabot PRs
- Waits for all CI checks to pass
- Auto-merges patch and minor updates
- Major updates require manual review
dependabot.yml manages automated dependency updates:
- npm dependencies - Weekly updates on Mondays
- Groups minor/patch updates together
- Separate group for dev dependencies
- Limit: 10 PRs max
- GitHub Actions - Weekly updates
- Groups all action updates
- Labeled with
github-actions
CODEOWNERS defines code review assignments:
- All files default to @blanta
- Package-specific ownership can be configured
- CI/CD files require review from repository owner
For full functionality, configure these repository secrets:
CODECOV_TOKEN(optional) - For uploading test coverageNPM_TOKEN(optional) - For publishing packages to npmGITHUB_TOKEN- Automatically provided by GitHub Actions
-
Branch Protection Rules (recommended):
- Require PR reviews before merging
- Require status checks to pass (CI Success)
- Require branches to be up to date
- Enable auto-merge for approved PRs
-
PR Guidelines:
- Use conventional commit format in titles
- Keep PRs focused and atomic
- Ensure all tests pass locally before pushing
-
Release Process:
# Create and push a version tag git tag v1.0.0 git push origin v1.0.0 # Or use workflow dispatch from GitHub UI
-
Local Development:
# Run the same checks that CI runs pnpm format:check # Format check pnpm lint # Linting pnpm typecheck # Type checking pnpm test # Tests pnpm build # Build
Lint/Format errors:
pnpm format # Auto-fix formatting
pnpm lint # Check linting issuesType errors:
pnpm typecheck # See type errors locallyTest failures:
pnpm test # Run tests
pnpm test:watch # Watch mode for debuggingIf Dependabot PRs are not auto-merging:
- Check that all CI checks pass
- Verify the update is minor/patch (not major)
- Ensure GitHub Actions permissions are correct
If releases fail:
- Verify tag format matches
v*pattern - Check that all tests pass
- Ensure version numbers are incremented properly
- Check Actions tab for workflow runs
- Review Dependabot alerts for vulnerabilities
- Monitor Code scanning if enabled