Skip to content

Commit f665c3b

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 b69a377 commit f665c3b

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

CLAUDE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ Parsing and constructing package URLs, compiled to CommonJS for deployment.
7474
- **Update snapshots**: `pnpm test:unit -u` or `pnpm testu`
7575

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

8283
## 📋 PURL-SPECIFIC RULES
8384

docs/CI_TESTING.md

Lines changed: 13 additions & 16 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
node-versions: '[20, 22, 24]'
4041
os-versions: '["ubuntu-latest", "windows-latest"]'
@@ -44,7 +45,7 @@ jobs:
4445
timeout-minutes: 10
4546
```
4647
47-
**Note**: For projects still using local reusable workflows (`.github/workflows/_reusable-test.yml`), migrate to socket-registry's centralized workflow.
48+
**🚨 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`
4849

4950
## Configuration Options
5051

@@ -73,11 +74,11 @@ jobs:
7374

7475
## Best Practices
7576

76-
### 1. Use Centralized Workflow
77+
### 1. Use Centralized CI Workflow
7778

78-
Always use socket-registry's centralized CI workflow for consistency:
79+
Always use socket-registry's centralized CI workflow with full commit SHA:
7980
```yaml
80-
uses: SocketDev/socket-registry/.github/workflows/ci.yml@main
81+
uses: SocketDev/socket-registry/.github/workflows/ci.yml@662bbcab1b7533e24ba8e3446cffd8a7e5f7617e # main
8182
```
8283

8384
### 2. Configure Timeouts
@@ -87,11 +88,7 @@ Set appropriate timeouts for your test suite:
8788
timeout-minutes: 10 # Adjust based on suite size
8889
```
8990

90-
### 3. Platform-Specific Tests
91-
92-
Use matrix exclude for platform-specific issues if needed.
93-
94-
### 4. Debug Mode
91+
### 3. Debug Mode
9592

9693
Enable debug mode for troubleshooting:
9794
```yaml
@@ -142,10 +139,10 @@ pnpm check
142139
## Integration with socket-registry
143140

144141
This project uses socket-registry's centralized CI infrastructure:
145-
- **CI Workflow**: `SocketDev/socket-registry/.github/workflows/ci.yml@main`
142+
- **CI Workflow**: `SocketDev/socket-registry/.github/workflows/ci.yml@<SHA>` (must use full commit SHA)
146143
- **Cross-platform compatibility**: Follows socket-registry guidelines
147144
- **Memory optimization**: Aligned with socket-registry patterns
148145

149-
**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 purl projects. See `socket-registry/docs/CI_TESTING_TOOLS.md` and `socket-registry/docs/PACKAGE_TESTING_GUIDE.md` for details.
146+
**🚨 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.
150147

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

0 commit comments

Comments
 (0)