Skip to content

Commit b73c116

Browse files
committed
Update documentation to require full commit SHAs
GitHub Actions require full-length commit SHAs. Updated all CI workflow references and standardized documentation messaging across Socket projects
1 parent 450c4ad commit b73c116

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ Each command follows consistent pattern:
104104
- ❌ WRONG: `pnpm run testu -- src/commands/specific/cmd-file.test.mts`
105105

106106
### CI Testing Infrastructure
107-
- **🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@main` for consistent CI across Socket projects
107+
- **🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@<SHA>` with full commit SHA (not @main)
108+
- **🚨 CRITICAL**: GitHub Actions require full-length commit SHAs. Format: `@662bbcab1b7533e24ba8e3446cffd8a7e5f7617e # main`
108109
- **Reusable workflows**: Socket-registry provides centralized, reusable workflows for lint/type-check/test/coverage
109110
- **Benefits**: Parallel execution, consistent configuration, cross-platform testing
110111
- **Documentation**: See `docs/CI_TESTING.md` and `socket-registry/docs/CI_TESTING_TOOLS.md`

docs/CI_TESTING.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@
44

55
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
7+
- **🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@<SHA>` with full commit SHA
8+
- **🚨 CRITICAL**: GitHub Actions require full-length commit SHAs, NOT `@main`. Format: `@662bbcab1b7533e24ba8e3446cffd8a7e5f7617e # main`
89
- **Multi-platform testing**: Linux, Windows, and macOS support
910
- **Multi-version Node.js matrix**: Test across Node.js 20, 22, and 24
1011
- **Flexible configuration**: Customizable test scripts, timeouts, and artifact uploads
1112
- **Memory optimization**: Configured heap sizes for CI and local environments
1213
- **Cross-platform compatibility**: Handles Windows and POSIX path differences
1314

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+
**🚨 Socket-registry-specific tools**: The `validate:packages` and `validate:ci` scripts are specific to socket-registry's package override structure and not applicable to other Socket projects. See `socket-registry/docs/CI_TESTING_TOOLS.md` for details.
1516

1617
## Workflow Structure
1718

1819
### Centralized CI Workflow
1920

20-
**🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@main` for consistent CI across all Socket projects.
21+
**🚨 MANDATORY**: Use `SocketDev/socket-registry/.github/workflows/ci.yml@<SHA>` with full commit SHA for consistent CI across all Socket projects.
2122

2223
**Key Features:**
2324
- Matrix testing across Node.js versions and operating systems
@@ -34,7 +35,7 @@ Located at `.github/workflows/test.yml`, this workflow calls socket-registry's r
3435
```yaml
3536
jobs:
3637
test:
37-
uses: SocketDev/socket-registry/.github/workflows/ci.yml@main
38+
uses: SocketDev/socket-registry/.github/workflows/ci.yml@662bbcab1b7533e24ba8e3446cffd8a7e5f7617e # main
3839
with:
3940
setup-script: 'pnpm run build:dist:src'
4041
node-versions: '[20, 22, 24]'
@@ -45,7 +46,7 @@ jobs:
4546
timeout-minutes: 15
4647
```
4748
48-
**Note**: For projects still using local reusable workflows (`.github/workflows/_reusable-test.yml`), migrate to socket-registry's centralized workflow.
49+
**🚨 CRITICAL**: Never use `@main` - always use the full 40-character commit SHA. Get the SHA with: `cd /path/to/socket-registry && git rev-parse main`
4950

5051
## Configuration Options
5152

@@ -92,11 +93,11 @@ The CLI relies on compiled TypeScript outputs in `dist/` directory. Tests will f
9293

9394
## Best Practices
9495

95-
### 1. Use Centralized Workflow
96+
### 1. Use Centralized CI Workflow
9697

97-
Always use socket-registry's centralized CI workflow for consistency:
98+
Always use socket-registry's centralized CI workflow with full commit SHA:
9899
```yaml
99-
uses: SocketDev/socket-registry/.github/workflows/ci.yml@main
100+
uses: SocketDev/socket-registry/.github/workflows/ci.yml@662bbcab1b7533e24ba8e3446cffd8a7e5f7617e # main
100101
```
101102

102103
### 2. Configure Timeouts
@@ -224,14 +225,14 @@ pnpm run s
224225
## Integration with socket-registry
225226

226227
This project uses socket-registry's centralized CI infrastructure:
227-
- **CI Workflow**: `SocketDev/socket-registry/.github/workflows/ci.yml@main`
228+
- **CI Workflow**: `SocketDev/socket-registry/.github/workflows/ci.yml@<SHA>` (must use full commit SHA)
228229
- **Cross-platform compatibility**: Follows socket-registry guidelines
229230
- **Memory optimization**: Aligned with socket-registry patterns
230231
- **Build requirements**: Pre-test builds are CLI-specific
231232

232-
**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 CLI projects. See `socket-registry/docs/CI_TESTING_TOOLS.md` and `socket-registry/docs/PACKAGE_TESTING_GUIDE.md` for details.
233+
**🚨 Socket-registry-specific tools**: The `validate:packages` and `validate:ci` scripts are specific to socket-registry's package override structure and not applicable to other Socket projects. See `socket-registry/docs/CI_TESTING_TOOLS.md` for details.
233234

234-
For consistency across Socket projects, follow the patterns established in socket-registry/CLAUDE.md and documented here.
235+
For consistency across Socket projects, follow the patterns established in `socket-registry/CLAUDE.md`.
235236

236237
## CLI-Specific Notes
237238

0 commit comments

Comments
 (0)