Skip to content

Commit 7960f9f

Browse files
committed
docs: add documentation script testing guidelines
Add comprehensive instructions for testing developer setup scripts using the test-doc-scripts workflow. This ensures documentation stays current and prevents broken installation instructions. Includes: - When to test (script modifications, new dependencies, new platforms) - How to trigger tests using GitHub labels and CLI - What gets tested across platforms - Motivation for on-demand testing approach This helps maintain reliable developer onboarding documentation.
1 parent 514788b commit 7960f9f

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

CLAUDE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,55 @@ referencing Claude.
218218
6. **Verify commit message contains no emojis and follows 80-character wrap**
219219
7. Proceed with testing or committing changes
220220

221+
### Documentation Script Testing
222+
223+
When modifying developer setup scripts in `website/docs/developers/scripts/`,
224+
always test them using the documentation testing workflow:
225+
226+
#### Testing Documentation Scripts
227+
228+
The project includes automated testing of developer setup scripts to ensure they
229+
work correctly across different platforms. This prevents developers from
230+
encountering broken installation instructions.
231+
232+
**When to test:**
233+
234+
- After modifying any script in `website/docs/developers/scripts/setup/`
235+
- When adding new dependencies or tools to the setup process
236+
- When changing installation procedures
237+
- When adding support for a new distribution or platform
238+
239+
**How to trigger tests:**
240+
241+
1. **For PRs**: Add the `test-doc-scripts` label to your pull request
242+
2. **Manual testing**: Use GitHub CLI:
243+
`gh pr edit <PR_NUMBER> --add-label test-doc-scripts`
244+
3. **Remove and re-add**: If tests need to be re-run, remove the label first:
245+
```bash
246+
gh pr edit <PR_NUMBER> --remove-label test-doc-scripts
247+
gh pr edit <PR_NUMBER> --add-label test-doc-scripts
248+
```
249+
250+
**What gets tested:**
251+
252+
- System dependencies installation (Ubuntu/macOS)
253+
- Rust toolchain setup (including taplo, wasm-pack, etc.)
254+
- Node.js installation
255+
- Docker installation
256+
- Build processes and formatting tools
257+
- Tool version verification
258+
259+
**Why this matters:**
260+
261+
- Ensures documentation stays current with actual requirements
262+
- Prevents "command not found" errors for new developers
263+
- Tests across multiple platforms (Ubuntu 22.04, 24.04, macOS)
264+
- Catches environment drift and dependency changes
265+
- Runs nightly to detect breaking changes early
266+
267+
The tests are designed to run on-demand via labels to avoid slowing down regular
268+
development workflow, as they can take significant time to complete.
269+
221270
### Critical Pre-Commit Requirements
222271

223272
- **MANDATORY**: Run `make fix-trailing-whitespace` before every commit

0 commit comments

Comments
 (0)