@@ -23,91 +23,117 @@ jobs:
23
23
&& tar -xzvf .github/workflows/test.tar.gz -C testrepo --no-same-owner
24
24
25
25
- name : default
26
- id : detect_module_a_default
26
+ id : detect_module_a_default # Expected: modules/a/tests/main.nf.test, modules/b/tests/main.nf.test (depends on A)
27
27
uses : ./
28
28
with :
29
29
root : testrepo/test
30
30
head : change_module_a
31
31
base : main
32
+ log_level : DEBUG
32
33
33
- - name : Ignore changes in module A
34
+ - name : Ignore changes in module A # Expected: Nothing
34
35
id : ignore_module_a
35
36
uses : ./
36
37
with :
37
38
root : testrepo/test
38
39
head : change_module_a
39
40
base : main
40
41
ignored : " modules/a/*"
42
+ log_level : DEBUG
41
43
42
- - name : Do not return workflows
43
- id : do_not_return_workflows
44
+ - name : Return directory # Expected: modules/a, modules/b (depends on A)
45
+ id : detect_module_a_directory
44
46
uses : ./
45
47
with :
46
48
root : testrepo/test
47
49
head : change_module_a
48
50
base : main
49
- types : " function,process,pipeline"
51
+ n_parents : 2
52
+ log_level : DEBUG
50
53
51
- - name : Return directory
52
- id : detect_module_a_directory
54
+ - name : Detect config changes # Expected: modules/c/tests/main.nf.test, subworkflows/a/tests/main.nf.test, tests/main.pipeline.nf.test, tests/main.workflow.nf.test
55
+ id : detect_config_changes
53
56
uses : ./
54
57
with :
55
58
root : testrepo/test
56
- head : change_module_a
59
+ head : modify_nextflow_config_in_module_c
57
60
base : main
58
- n_parents : 2
59
-
60
- - name : Detect config changes
61
- id : detect_config_changes
61
+ log_level : DEBUG
62
+
63
+ - name : Do not return workflows # Expected: modules/c/tests/main.nf.test, tests/main.pipeline.nf.test; Same as above but without workflows
64
+ id : do_not_return_workflows
62
65
uses : ./
63
66
with :
64
67
root : testrepo/test
65
68
head : modify_nextflow_config_in_module_c
66
69
base : main
70
+ types : " function,process,pipeline"
71
+ log_level : DEBUG
67
72
68
- - name : Detect additional include statement file
73
+ - name : Detect additional include statement file # Expected: tests/main.pipeline.nf.test, tests/main.workflow.nf.test
69
74
id : detect_additional_include_file
70
75
uses : ./
71
76
with :
72
77
root : testrepo/test
73
78
head : modify_main_nextflow_file
74
79
base : main
80
+ log_level : DEBUG
75
81
76
- - name : Include tags
82
+ - name : Include tags # Expected: "tests/main.pipeline.nf.test"
77
83
id : detect_tags
78
84
uses : ./
79
85
with :
80
86
root : testrepo/test
81
87
head : modify_main_nextflow_file
82
88
base : main
83
- tags : " PIPELINE" # should pick one test
89
+ tags : " PIPELINE"
90
+ log_level : DEBUG
84
91
85
- - name : Exclude tags
92
+ - name : Exclude tags # Expected: Nothing
86
93
id : exclude_tags
87
94
uses : ./
88
95
with :
89
96
root : testrepo/test
90
97
head : modify_main_nextflow_file
91
98
base : main
92
- tags : " PIPELINE" # should pick one test
93
- exclude_tags : " PIPELINE" # should drop the test
99
+ tags : " PIPELINE"
100
+ exclude_tags : " PIPELINE"
101
+ log_level : DEBUG
94
102
95
- - name : Detect multi-line include
103
+ - name : Detect multi-line include # Expected: subworkflows/a/tests/main.nf.test, tests/main.pipeline.nf.test, tests/main.workflow.nf.test
96
104
id : multi_line_include
97
105
uses : ./
98
106
with :
99
107
root : testrepo/test
100
108
head : multi_line_include
101
109
base : main
110
+ log_level : DEBUG
102
111
103
- - name : print outputs
112
+ - name : Print and assert outputs
104
113
run : |
105
114
echo Default: ${{ steps.detect_module_a_default.outputs.components }}
115
+ [ '${{ steps.detect_module_a_default.outputs.components }}' = '["modules/a/tests/main.nf.test", "modules/b/tests/main.nf.test"]' ]
116
+
106
117
echo Ignore module A: ${{ steps.ignore_module_a.outputs.components }}
107
- echo No workflows: ${{ steps.do_not_return_workflows.outputs.components }}
118
+ [ '${{ steps.ignore_module_a.outputs.components }}' = '[]' ]
119
+
108
120
echo Directories: ${{ steps.detect_module_a_directory.outputs.components }}
121
+ [ '${{ steps.detect_module_a_directory.outputs.components }}' = '["modules/a", "modules/b"]' ]
122
+
109
123
echo Config files: ${{ steps.detect_config_changes.outputs.components }}
124
+ [ '${{ steps.detect_config_changes.outputs.components }}' = '["modules/c/tests/main.nf.test", "subworkflows/a/tests/main.nf.test", "tests/main.pipeline.nf.test", "tests/main.workflow.nf.test"]' ]
125
+
126
+ echo No workflows: ${{ steps.do_not_return_workflows.outputs.components }}
127
+ [ '${{ steps.do_not_return_workflows.outputs.components }}' = '["modules/c/tests/main.nf.test", "tests/main.pipeline.nf.test"]' ]
128
+
110
129
echo Additional include file: ${{ steps.detect_additional_include_file.outputs.components }}
130
+ [ '${{ steps.detect_additional_include_file.outputs.components }}' = '["tests/main.pipeline.nf.test", "tests/main.workflow.nf.test"]' ]
131
+
111
132
echo Tags: ${{ steps.detect_tags.outputs.components }}
133
+ [ '${{ steps.detect_tags.outputs.components }}' = '["tests/main.pipeline.nf.test"]' ]
134
+
112
135
echo Exclude tags: ${{ steps.exclude_tags.outputs.components }}
136
+ [ '${{ steps.exclude_tags.outputs.components }}' = '[]' ]
137
+
113
138
echo Multi-line include: ${{ steps.multi_line_include.outputs.components }}
139
+ [ '${{ steps.multi_line_include.outputs.components }}' = '["subworkflows/a/tests/main.nf.test", "tests/main.pipeline.nf.test", "tests/main.workflow.nf.test"]' ]
0 commit comments