@@ -123,7 +123,8 @@ def test_collects_workflows_for_all(self):
123123 frame = pd .read_csv (path )
124124 self .assertTrue (
125125 all (col in frame .columns for col in
126- ["workflows" , "w_jobs" , "w_oss" , "w_steps" , "w_has_releases" ]),
126+ ["workflows" , "w_jobs" , "w_oss" , "w_steps" ,
127+ "w_has_releases" ]),
127128 f"Frame { frame .columns } doesn't have expected columns"
128129 )
129130
@@ -142,7 +143,7 @@ def test_counts_workflows_correctly(self):
142143 result = frame ["workflows" ].tolist ()
143144 self .assertEqual (
144145 result ,
145- [4 , 0 , 2 , 1 , 1 , 0 , 2 , 0 , 0 , 1 , 1 , 1 , 10 ],
146+ [4 , 0 , 2 , 1 , 1 , 0 , 2 , 0 , 0 , 1 , 1 , 1 , 10 , 1 ],
146147 "Workflows counts don't match with expected"
147148 )
148149
@@ -177,7 +178,6 @@ def test_returns_true_when_workflow_has_push_on_version(self):
177178 "Workflow should be used for releases, but it wasn't"
178179 )
179180
180-
181181 @pytest .mark .fast
182182 def test_returns_false_when_no_release (self ):
183183 self .assertFalse (
@@ -254,3 +254,31 @@ def test_outputs_workflow_info_with_nested_expression(self):
254254 4 ,
255255 f"Steps count in workflow: '{ info } ' does not match with expected"
256256 )
257+
258+ @pytest .mark .fast
259+ def test_skips_matrix_as_text (self ):
260+ info = workflow_info (
261+ """
262+ on: push
263+ jobs:
264+ plan:
265+ strategy:
266+ matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
267+ runs-on: ubuntu-latest
268+ """
269+ )
270+ self .assertEqual (
271+ info ["w_oss" ],
272+ ["ubuntu-latest" ],
273+ f"Workflow OSs: '{ info } ' does not match with expected"
274+ )
275+ self .assertEqual (
276+ info ["w_jobs" ],
277+ 1 ,
278+ f"Jobs count in workflow: '{ info } ' does not match with expected"
279+ )
280+ self .assertEqual (
281+ info ["w_steps" ],
282+ 0 ,
283+ f"Steps count in workflow: '{ info } ' does not match with expected"
284+ )
0 commit comments