File tree Expand file tree Collapse file tree 2 files changed +28
-8
lines changed
commodore/component-template/{{ cookiecutter.slug }} Expand file tree Collapse file tree 2 files changed +28
-8
lines changed Original file line number Diff line number Diff line change 1
1
:global :
2
2
componentName : {{ cookiecutter.name }}
3
- feature_goldenTests : true
3
+ feature_goldenTests : {% if cookiecutter.add_golden == "y" %}true{% else %}false{% endif %}
4
+ {%- if cookiecutter.add_matrix == "y" %}
5
+ testMatrix :
6
+ key : instance
7
+ entries :
8
+ - defaults
9
+
10
+ {%- endif %}
4
11
5
12
docs/antora.yml :
6
13
name : {{ cookiecutter.slug }}
7
14
title : {{ cookiecutter.name }}
8
- {% if cookiecutter.add_matrix == "y" - %}
15
+ {%- if cookiecutter.add_matrix == "y" %}
9
16
10
17
.github/workflows/test.yaml :
11
18
test_makeTarget : test -e instance={% raw %}${{ matrix.instance }}{% endraw %}
12
19
{%- if cookiecutter.add_golden == "y" %}
13
20
goldenTest_makeTarget : golden-diff -e instance={% raw %}${{ matrix.instance }}{% endraw %}
14
- {%- endif %}
15
- matrix :
16
- key : instance
17
- entries :
18
- - defaults
19
- {% endif -%}
21
+ {%- endif -%}
22
+ {% endif %}
Original file line number Diff line number Diff line change @@ -141,6 +141,23 @@ def test_run_component_new_command(
141
141
else :
142
142
assert run_step ["run" ] == "make golden-diff"
143
143
144
+ with open (tmp_path / "dependencies" / component_name / ".sync.yml" ) as syncyml :
145
+ syncconfig = yaml .safe_load (syncyml )
146
+ assert ":global" in syncconfig
147
+
148
+ globalconfig = syncconfig [":global" ]
149
+ assert "componentName" in globalconfig
150
+ assert "feature_goldenTests" in globalconfig
151
+ assert ("testMatrix" in globalconfig ) == has_matrix
152
+
153
+ assert globalconfig ["componentName" ] == component_name
154
+ assert globalconfig ["feature_goldenTests" ] == has_golden
155
+
156
+ assert (".github/workflows/test.yaml" in syncconfig ) == has_matrix
157
+ if has_matrix :
158
+ ghconfig = syncconfig [".github/workflows/test.yaml" ]
159
+ assert ("goldenTest_makeTarget" in ghconfig ) == has_golden
160
+
144
161
with open (
145
162
tmp_path / "dependencies" / component_name / "renovate.json"
146
163
) as renovatejson :
You can’t perform that action at this time.
0 commit comments