File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Example Scripts
2
+
3
+ This directory contains example scripts for testing Thira's parallel script execution functionality.
4
+
5
+ ## Scripts
6
+
7
+ ### test1.sh
8
+
9
+ A simple test script that demonstrates:
10
+
11
+ - Environment variable usage (` TEST_MODE ` , ` TEST_VALUE ` )
12
+ - Working directory display
13
+ - Simulated work with progress output
14
+ - Multi-step execution with delays
15
+
16
+ ### test2.sh
17
+
18
+ Another test script for parallel execution testing.
19
+
20
+ ## Usage
21
+
22
+ These scripts are designed to be run in parallel using Thira's script management feature. You can configure them in your ` hooks.yaml ` file like this:
23
+
24
+ ``` yaml
25
+ scripts :
26
+ test-all :
27
+ parallel : true
28
+ max_threads : 2
29
+ commands :
30
+ - command : " sh test1.sh"
31
+ description : " Run test script 1"
32
+ working_dir : " examples"
33
+ env :
34
+ TEST_VALUE : " 123"
35
+ TEST_MODE : " parallel-1"
36
+ - command : " sh test2.sh"
37
+ description : " Run test script 2"
38
+ working_dir : " examples"
39
+ env :
40
+ TEST_VALUE : " 456"
41
+ TEST_MODE : " parallel-2"
42
+ ` ` `
43
+
44
+ Then run them with:
45
+
46
+ ` ` ` sh
47
+ thira scripts run test-parallel
48
+ ```
49
+
50
+ ## Purpose
51
+
52
+ These scripts help demonstrate and test:
53
+
54
+ - Parallel script execution
55
+ - Environment variable passing
56
+ - Real-time output display
57
+ - Progress indication during long-running tasks
58
+ - Multi-threaded script management
You can’t perform that action at this time.
0 commit comments