协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
ci-pipeline-synthesizer【开发与工程】Generate GitHub Actions CI/CD pipeline configurations for automated building and testing of library and package projects. Use when creating or updating CI workflows for npm packages, Python packages, Go modules, Rust crates, or other library projects that need automated build and test pipelines. Includes templates for common package ecosystems with b…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate production-ready GitHub Actions workflow files for library and package projects with automated build and test stages, dependency caching, and multi-version testing matrices.
Determine the package ecosystem by examining project files:
package.json presentsetup.py, pyproject.toml, or requirements.txt presentgo.mod presentCargo.toml presentUse the appropriate template from assets/ based on project type:
github-actions-nodejs.yml - Node.js/npm packagesgithub-actions-python.yml - Python packagesgithub-actions-go.yml - Go modulesgithub-actions-rust.yml - Rust cratesAdapt the template to project-specific needs:
Test commands: Update test scripts to match project conventions
npm test, npm run test:coveragepytest, python -m unittestgo test ./...cargo testBuild commands: Adjust build steps if needed
npm run build (if build step exists)python -m buildgo buildcargo build --releaseVersion matrix: Modify tested versions based on support policy
Trigger conditions: Adjust when pipeline runs
Create the workflow file at .github/workflows/ci.yml in the project root. If .github/workflows/ doesn't exist, create the directory structure first.
Check that the generated workflow:
actions/checkout@v4, actions/setup-node@v4)All templates include:
Add code coverage reporting:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Add linting step:
- name: Run linter
run: npm run lint # or: pylint, golangci-lint, cargo clippy
Restrict to specific branches:
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
Add scheduled runs:
on:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
actions/cache for dependencies to reduce build times