|
2 | 2 |
|
3 | 3 | ## Overview |
4 | 4 |
|
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: |
6 | 6 |
|
| 7 | +- **🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@main` for consistent CI |
7 | 8 | - **Multi-platform testing**: Linux, Windows, and macOS support |
8 | 9 | - **Multi-version Node.js matrix**: Test across Node.js 20, 22, and 24 |
9 | 10 | - **Flexible configuration**: Customizable test scripts, timeouts, and artifact uploads |
10 | 11 | - **Memory optimization**: Configured heap sizes for CI and local environments |
11 | 12 | - **Cross-platform compatibility**: Handles Windows and POSIX path differences |
12 | 13 |
|
| 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 | + |
13 | 16 | ## Workflow Structure |
14 | 17 |
|
15 | | -### Reusable Test Workflow |
| 18 | +### Centralized CI Workflow |
16 | 19 |
|
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. |
18 | 21 |
|
19 | 22 | **Key Features:** |
20 | 23 | - 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 |
22 | 26 | - Artifact upload support for coverage reports |
23 | 27 | - Debug mode for verbose logging |
24 | 28 | - Timeout protection for long-running tests |
25 | 29 |
|
26 | 30 | ### Main Test Workflow |
27 | 31 |
|
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: |
29 | 33 |
|
30 | 34 | ```yaml |
31 | 35 | jobs: |
32 | 36 | test: |
33 | | - uses: ./.github/workflows/_reusable-test.yml |
| 37 | + uses: SocketDev/socket-registry/.github/workflows/ci.yml@main |
34 | 38 | with: |
35 | 39 | setup-script: 'pnpm run build' |
36 | 40 | node-versions: '[20, 22, 24]' |
37 | 41 | os-versions: '["ubuntu-latest", "windows-latest"]' |
38 | 42 | test-script: 'pnpm run test-ci' |
| 43 | + lint-script: 'pnpm run check:lint' |
| 44 | + type-check-script: 'pnpm run check:tsc' |
39 | 45 | timeout-minutes: 10 |
40 | 46 | upload-artifacts: false |
41 | 47 | ``` |
42 | 48 |
|
| 49 | +**Note**: For projects still using local reusable workflows (`.github/workflows/_reusable-test.yml`), migrate to socket-registry's centralized workflow. |
| 50 | + |
43 | 51 | ## Configuration Options |
44 | 52 |
|
45 | 53 | ### Input Parameters |
@@ -232,13 +240,15 @@ pnpm run test:run |
232 | 240 |
|
233 | 241 | ## Integration with socket-registry |
234 | 242 |
|
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. |
240 | 250 |
|
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. |
242 | 252 |
|
243 | 253 | ## Future Enhancements |
244 | 254 |
|
|
0 commit comments