You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: playbooks/README.md
-135Lines changed: 0 additions & 135 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,141 +116,6 @@ Content displays directly since these are required steps, not optional reference
116
116
- Include expected output so users know what success looks like
117
117
- Keep code blocks copy-friendly (avoid `$` or `>` prompts)
118
118
119
-
### Testing Tags
120
-
121
-
Use `@test` tags to make existing code blocks testable. These tags **wrap your existing code** and are picked up by CI to run automated tests. The HTML comment tags themselves are invisible to website visitors, but the wrapped code remains visible by default. Add `hidden=true` to hide the code block from the website if needed (e.g., for test-only setup commands).
122
-
123
-
**Basic syntax — wrap existing code blocks:**
124
-
125
-
```markdown
126
-
<!-- @test:id=install-deps timeout=300 -->
127
-
```bash
128
-
pip install transformers accelerate
129
-
```
130
-
<!-- @test:end -->
131
-
```
132
-
133
-
The test tags wrap the code block that users see. No duplication needed — the same code that appears in the playbook is what gets tested.
134
-
135
-
**Test attributes:**
136
-
137
-
| Attribute | Required | Default | Description |
138
-
|-----------|----------|---------|-------------|
139
-
|`id`| Yes | — | Unique identifier for the test (use kebab-case) |
140
-
|`timeout`| No |`300`| Maximum execution time in seconds |
141
-
|`continue_on_error`| No |`false`| If `true`, test failure won't fail the CI job |
142
-
|`hidden`| No |`false`| If `true`, hides the code block from the website (useful for test-only setup) |
143
-
144
-
> **Note:** Platform is automatically inferred from the surrounding `@os:` tags. Tests inside `<!-- @os:windows -->` run only on Windows, tests inside `<!-- @os:linux -->` run only on Linux, and tests outside any `@os:` block run on all platforms.
145
-
146
-
**Supported languages:**
147
-
148
-
| Language tag | Execution |
149
-
|--------------|-----------|
150
-
|`bash`, `sh`, `shell`| PowerShell on Windows, Bash on Linux |
151
-
|`cmd`, `batch`| Windows CMD |
152
-
|`powershell`, `pwsh`, `ps1`| PowerShell |
153
-
|`python`| Python interpreter |
154
-
155
-
**Example: Ordering tests by README position**
156
-
157
-
Tests run in the order they appear in the README. Place prerequisite steps before the tests that need them:
158
-
159
-
```markdown
160
-
### Create Virtual Environment
161
-
162
-
<!-- @os:windows -->
163
-
<!-- @test:id=create-venv timeout=60 -->
164
-
```cmd
165
-
python -m venv myenv
166
-
myenv\Scripts\activate.bat
167
-
```
168
-
<!-- @test:end -->
169
-
<!-- @os:end -->
170
-
171
-
### Install Dependencies
172
-
173
-
<!-- @test:id=install-deps timeout=300 -->
174
-
```bash
175
-
pip install transformers torch
176
-
```
177
-
<!-- @test:end -->
178
-
179
-
### Run the Script
180
-
181
-
<!-- @test:id=run-script timeout=60 -->
182
-
```bash
183
-
python run_model.py --help
184
-
```
185
-
<!-- @test:end -->
186
-
```
187
-
188
-
In this example, `create-venv` runs first, then `install-deps`, then `run-script` — matching the natural reading order of the playbook.
189
-
190
-
**Example: Platform-specific tests**
191
-
192
-
Combine with `@os` tags for platform-specific instructions:
193
-
194
-
```markdown
195
-
<!-- @os:windows -->
196
-
<!-- @test:id=setup timeout=120 -->
197
-
```cmd
198
-
pip install torch
199
-
python -c "import torch; print('OK')"
200
-
```
201
-
<!-- @test:end -->
202
-
<!-- @os:end -->
203
-
204
-
<!-- @os:linux -->
205
-
<!-- @test:id=setup timeout=120 -->
206
-
```bash
207
-
pip3 install torch
208
-
python3 -c "import torch; print('OK')"
209
-
```
210
-
<!-- @test:end -->
211
-
<!-- @os:end -->
212
-
```
213
-
214
-
**Example: Verification tests (not shown to users)**
215
-
216
-
For tests that verify things but shouldn't appear in the playbook, place them after visible content:
> **Note:** The testing infrastructure is still being developed. Playbook creators are not expected to add tests to their playbooks yet.
4
+
5
+
---
6
+
7
+
## Testing Tags
8
+
9
+
Use `@test` tags to make existing code blocks testable. These tags **wrap your existing code** and are picked up by CI to run automated tests. The HTML comment tags themselves are invisible to website visitors, but the wrapped code remains visible by default. Add `hidden=true` to hide the code block from the website if needed (e.g., for test-only setup commands).
10
+
11
+
**Basic syntax — wrap existing code blocks:**
12
+
13
+
```markdown
14
+
<!-- @test:id=install-deps timeout=300 -->
15
+
```bash
16
+
pip install transformers accelerate
17
+
```
18
+
<!-- @test:end -->
19
+
```
20
+
21
+
The test tags wrap the code block that users see. No duplication needed — the same code that appears in the playbook is what gets tested.
22
+
23
+
**Test attributes:**
24
+
25
+
| Attribute | Required | Default | Description |
26
+
|-----------|----------|---------|-------------|
27
+
|`id`| Yes | — | Unique identifier for the test (use kebab-case) |
28
+
|`timeout`| No |`300`| Maximum execution time in seconds |
29
+
|`continue_on_error`| No |`false`| If `true`, test failure won't fail the CI job |
30
+
|`hidden`| No |`false`| If `true`, hides the code block from the website (useful for test-only setup) |
31
+
32
+
> **Note:** Platform is automatically inferred from the surrounding `@os:` tags. Tests inside `<!-- @os:windows -->` run only on Windows, tests inside `<!-- @os:linux -->` run only on Linux, and tests outside any `@os:` block run on all platforms.
33
+
34
+
**Supported languages:**
35
+
36
+
| Language tag | Execution |
37
+
|--------------|-----------|
38
+
|`bash`, `sh`, `shell`| PowerShell on Windows, Bash on Linux |
39
+
|`cmd`, `batch`| Windows CMD |
40
+
|`powershell`, `pwsh`, `ps1`| PowerShell |
41
+
|`python`| Python interpreter |
42
+
43
+
**Example: Ordering tests by README position**
44
+
45
+
Tests run in the order they appear in the README. Place prerequisite steps before the tests that need them:
46
+
47
+
```markdown
48
+
### Create Virtual Environment
49
+
50
+
<!-- @os:windows -->
51
+
<!-- @test:id=create-venv timeout=60 -->
52
+
```cmd
53
+
python -m venv myenv
54
+
myenv\Scripts\activate.bat
55
+
```
56
+
<!-- @test:end -->
57
+
<!-- @os:end -->
58
+
59
+
### Install Dependencies
60
+
61
+
<!-- @test:id=install-deps timeout=300 -->
62
+
```bash
63
+
pip install transformers torch
64
+
```
65
+
<!-- @test:end -->
66
+
67
+
### Run the Script
68
+
69
+
<!-- @test:id=run-script timeout=60 -->
70
+
```bash
71
+
python run_model.py --help
72
+
```
73
+
<!-- @test:end -->
74
+
```
75
+
76
+
In this example, `create-venv` runs first, then `install-deps`, then `run-script` — matching the natural reading order of the playbook.
77
+
78
+
**Example: Platform-specific tests**
79
+
80
+
Combine with `@os` tags for platform-specific instructions:
81
+
82
+
```markdown
83
+
<!-- @os:windows -->
84
+
<!-- @test:id=setup timeout=120 -->
85
+
```cmd
86
+
pip install torch
87
+
python -c "import torch; print('OK')"
88
+
```
89
+
<!-- @test:end -->
90
+
<!-- @os:end -->
91
+
92
+
<!-- @os:linux -->
93
+
<!-- @test:id=setup timeout=120 -->
94
+
```bash
95
+
pip3 install torch
96
+
python3 -c "import torch; print('OK')"
97
+
```
98
+
<!-- @test:end -->
99
+
<!-- @os:end -->
100
+
```
101
+
102
+
**Example: Verification tests (not shown to users)**
103
+
104
+
For tests that verify things but shouldn't appear in the playbook, place them after visible content:
0 commit comments