mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
docs(ci): add fork PR contributor guide and integration test documentation
- Create comprehensive guide for fork contributors (.github/FORK_CONTRIBUTORS.md) - Document fork PR behavior in E2E test README - Explain why integration tests are skipped for fork PRs (security) - Provide instructions for running tests locally Related to ROO-531
This commit is contained in:
parent
dbf206f06b
commit
d2e9d477db
2 changed files with 110 additions and 0 deletions
92
.github/FORK_CONTRIBUTORS.md
vendored
Normal file
92
.github/FORK_CONTRIBUTORS.md
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
# Contributing from a Fork
|
||||
|
||||
Thank you for contributing to Roo Code! If you're contributing from a forked repository, please be aware of the following regarding CI workflows.
|
||||
|
||||
## Integration Tests for Fork PRs
|
||||
|
||||
**Important**: Integration tests (E2E tests) will be **skipped automatically** for pull requests from forked repositories.
|
||||
|
||||
### Why Are Tests Skipped?
|
||||
|
||||
For security reasons, GitHub does not expose repository secrets (like API keys) to workflows triggered by pull requests from forks. This is a critical security feature that prevents malicious actors from:
|
||||
|
||||
- Stealing API keys
|
||||
- Running up costs on paid API services
|
||||
- Accessing sensitive infrastructure
|
||||
|
||||
Since our integration tests require an OpenRouter API key (`OPENROUTER_API_KEY` secret) to test real AI interactions, they cannot run on fork PRs without this secret.
|
||||
|
||||
### What This Means for Your PR
|
||||
|
||||
1. **Your PR will show integration tests as "skipped"** - this is expected and normal
|
||||
2. **Other CI checks will still run** - linting, type checking, unit tests, etc.
|
||||
3. **A maintainer will review your PR** - after code review, maintainers can:
|
||||
- Trigger integration tests manually
|
||||
- Merge your PR to a branch in the main repo where tests can run
|
||||
- Run tests locally before merging
|
||||
|
||||
### What You Should Do
|
||||
|
||||
1. **Ensure all other CI checks pass** - unit tests, linting, type checking
|
||||
2. **Test your changes locally** if possible:
|
||||
- Follow the E2E testing guide in [`apps/vscode-e2e/README.md`](../apps/vscode-e2e/README.md)
|
||||
- Set up your own OpenRouter API key for local testing
|
||||
3. **Provide clear testing evidence** in your PR description:
|
||||
- Screenshots or videos of functionality working
|
||||
- Description of manual testing performed
|
||||
- Any relevant logs or output
|
||||
4. **Be patient** - maintainers will run full integration tests during review
|
||||
|
||||
### Running Integration Tests Locally
|
||||
|
||||
If you want to run integration tests locally before submitting your PR:
|
||||
|
||||
1. **Get an OpenRouter API key**:
|
||||
|
||||
- Sign up at [OpenRouter](https://openrouter.ai/)
|
||||
- Add credits to your account (tests cost ~$0.10-0.50 to run)
|
||||
|
||||
2. **Set up local environment**:
|
||||
|
||||
```bash
|
||||
cd apps/vscode-e2e
|
||||
cp .env.local.sample .env.local
|
||||
# Edit .env.local and add your OPENROUTER_API_KEY
|
||||
```
|
||||
|
||||
3. **Run the tests**:
|
||||
```bash
|
||||
pnpm test:ci
|
||||
```
|
||||
|
||||
See the [E2E Testing README](../apps/vscode-e2e/README.md) for complete instructions.
|
||||
|
||||
### Alternative: Request Maintainer Testing
|
||||
|
||||
If you cannot run integration tests locally, you can:
|
||||
|
||||
1. Submit your PR with all other CI checks passing
|
||||
2. Add a comment requesting integration test runs
|
||||
3. A maintainer will review your code and run integration tests
|
||||
|
||||
## Other CI Workflows
|
||||
|
||||
The following workflows **will run** on fork PRs:
|
||||
|
||||
- ✅ **Linting** - Code style and quality checks
|
||||
- ✅ **Type checking** - TypeScript type validation
|
||||
- ✅ **Unit tests** - Fast, isolated tests without external dependencies
|
||||
- ✅ **Translation checks** - Ensuring all translations are complete
|
||||
- ✅ **Dependency checks** (Knip) - Unused dependency detection
|
||||
|
||||
These workflows provide significant code quality assurance even without integration tests.
|
||||
|
||||
## Questions?
|
||||
|
||||
If you have questions about fork contributions or testing:
|
||||
|
||||
- Check the [main CONTRIBUTING guide](../../CONTRIBUTING.md)
|
||||
- Ask in the PR discussion
|
||||
- Reach out in the community channels
|
||||
|
||||
Thank you for contributing to Roo Code!
|
||||
|
|
@ -338,6 +338,24 @@ See [`.github/workflows/code-qa.yml`](../../.github/workflows/code-qa.yml) for t
|
|||
- Tests run on Ubuntu with xvfb for headless display
|
||||
- VSCode 1.101.2 is downloaded and cached
|
||||
|
||||
### Fork Pull Requests
|
||||
|
||||
**Important**: Integration tests are **automatically skipped** for pull requests from forked repositories.
|
||||
|
||||
This is a security requirement - GitHub does not expose repository secrets to fork PRs to prevent unauthorized access to API keys and other sensitive credentials. Since these tests require the `OPENROUTER_API_KEY` secret, they cannot run on fork PRs.
|
||||
|
||||
**For fork contributors**: See [`.github/FORK_CONTRIBUTORS.md`](../../.github/FORK_CONTRIBUTORS.md) for:
|
||||
|
||||
- Why tests are skipped on fork PRs
|
||||
- How to run tests locally with your own API key
|
||||
- What maintainers will do to test your PR
|
||||
|
||||
**For maintainers**: After reviewing a fork PR's code, you can:
|
||||
|
||||
- Manually trigger the workflow with repository secrets
|
||||
- Merge the PR to a branch in the main repo where tests will run automatically
|
||||
- Run tests locally before merging
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Enable Debug Logging
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue