Skip to content

Commit 6ae57cb

Browse files
committed
Update CI documentation to reference socket-registry workflows
Add references to socket-registry's centralized CI workflow and clarify that package-specific validation tools are unique to socket-registry
1 parent 0f4be54 commit 6ae57cb

2 files changed

Lines changed: 25 additions & 14 deletions

File tree

CLAUDE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ Programmatic access to Socket.dev's security analysis capabilities.
8888
- ❌ WRONG: `it('works', ...)`
8989

9090
### CI Testing Infrastructure
91-
- **Reusable workflows**: Use `.github/workflows/_reusable-test.yml`
91+
- **🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@main` for consistent CI across Socket projects
92+
- **Reusable workflows**: Socket-registry provides centralized, reusable workflows for lint/type-check/test/coverage
9293
- **Matrix testing**: Test across Node.js versions (20, 22, 24) and platforms
9394
- **Custom test runner**: `scripts/test.mjs` provides glob expansion
9495
- **Memory configuration**: Automatic heap size adjustment for CI (8GB) vs local (4GB)
95-
- **Documentation**: See `docs/CI_TESTING.md`
96+
- **Documentation**: See `docs/CI_TESTING.md` and `socket-registry/docs/CI_TESTING_TOOLS.md`
9697

9798
## 🔒 SECURITY & SAFETY
9899

docs/CI_TESTING.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,52 @@
22

33
## Overview
44

5-
This project uses a comprehensive CI testing solution inspired by socket-registry's testing infrastructure. The solution provides:
5+
This project uses socket-registry's centralized CI testing infrastructure. The solution provides:
66

7+
- **🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@main` for consistent CI
78
- **Multi-platform testing**: Linux, Windows, and macOS support
89
- **Multi-version Node.js matrix**: Test across Node.js 20, 22, and 24
910
- **Flexible configuration**: Customizable test scripts, timeouts, and artifact uploads
1011
- **Memory optimization**: Configured heap sizes for CI and local environments
1112
- **Cross-platform compatibility**: Handles Windows and POSIX path differences
1213

14+
**For socket-registry-specific package testing tools**, see `socket-registry/docs/CI_TESTING_TOOLS.md` and `socket-registry/docs/PACKAGE_TESTING_GUIDE.md`. These tools (`validate:packages`, `validate:ci`) are specific to socket-registry's package override structure.
15+
1316
## Workflow Structure
1417

15-
### Reusable Test Workflow
18+
### Centralized CI Workflow
1619

17-
Located at `.github/workflows/_reusable-test.yml`, this workflow provides a flexible testing foundation that can be customized per project.
20+
**🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@main` for consistent CI across all Socket projects.
1821

1922
**Key Features:**
2023
- Matrix testing across Node.js versions and operating systems
21-
- Configurable setup scripts for build steps
24+
- Parallel execution of lint, type-check, test, and coverage
25+
- Configurable scripts for project-specific requirements
2226
- Artifact upload support for coverage reports
2327
- Debug mode for verbose logging
2428
- Timeout protection for long-running tests
2529

2630
### Main Test Workflow
2731

28-
Located at `.github/workflows/test.yml`, this workflow calls the reusable workflow with project-specific configuration:
32+
Located at `.github/workflows/test.yml`, this workflow calls socket-registry's reusable CI workflow:
2933

3034
```yaml
3135
jobs:
3236
test:
33-
uses: ./.github/workflows/_reusable-test.yml
37+
uses: SocketDev/socket-registry/.github/workflows/ci.yml@main
3438
with:
3539
setup-script: 'pnpm run build'
3640
node-versions: '[20, 22, 24]'
3741
os-versions: '["ubuntu-latest", "windows-latest"]'
3842
test-script: 'pnpm run test-ci'
43+
lint-script: 'pnpm run check:lint'
44+
type-check-script: 'pnpm run check:tsc'
3945
timeout-minutes: 10
4046
upload-artifacts: false
4147
```
4248
49+
**Note**: For projects still using local reusable workflows (`.github/workflows/_reusable-test.yml`), migrate to socket-registry's centralized workflow.
50+
4351
## Configuration Options
4452

4553
### Input Parameters
@@ -232,13 +240,15 @@ pnpm run test:run
232240

233241
## Integration with socket-registry
234242

235-
This testing solution is aligned with socket-registry patterns:
236-
- Reusable workflow structure
237-
- Memory optimization strategies
238-
- Cross-platform compatibility
239-
- Test coordination utilities
243+
This project uses socket-registry's centralized CI infrastructure:
244+
- **CI Workflow**: `SocketDev/socket-registry/.github/workflows/ci.yml@main`
245+
- **Memory optimization strategies**: Aligned with socket-registry patterns
246+
- **Cross-platform compatibility**: Follows socket-registry guidelines
247+
- **Test coordination utilities**: Shared utilities from socket-registry
248+
249+
**Socket-registry-specific tools**: The `validate:packages` and `validate:ci` scripts in socket-registry are specific to its package override structure and not applicable to SDK projects. See `socket-registry/docs/CI_TESTING_TOOLS.md` and `socket-registry/docs/PACKAGE_TESTING_GUIDE.md` for details.
240250

241-
For consistency across Socket projects, follow the patterns established in socket-registry and documented here.
251+
For consistency across Socket projects, follow the patterns established in socket-registry/CLAUDE.md and documented here.
242252

243253
## Future Enhancements
244254

0 commit comments

Comments
 (0)