Skip to content

Commit b3e663d

Browse files
authored
Merge pull request #77 from projectsyn/template-sync
Update from component template
2 parents df6fd2d + 5a79a2b commit b3e663d

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

.cruft.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/projectsyn/commodore-component-template.git",
3-
"commit": "a4aff6a9d004c1aad085a875c7759c8f8f1e0d3d",
3+
"commit": "7803d07f1d79fc8b902fcafbb336b6b0a4b57b90",
44
"checkout": "main",
55
"context": {
66
"cookiecutter": {
@@ -11,7 +11,7 @@
1111
"add_lib": "y",
1212
"add_pp": "n",
1313
"add_golden": "y",
14-
"add_matrix": "n",
14+
"add_matrix": "y",
1515
"add_go_unit": "n",
1616
"copyright_holder": "VSHN AG <info@vshn.ch>",
1717
"copyright_year": "2021",

.github/workflows/test.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
args: 'check'
3030
test:
3131
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
instance:
35+
- defaults
36+
- cattle-system
3237
defaults:
3338
run:
3439
working-directory: ${{ env.COMPONENT_NAME }}
@@ -37,9 +42,14 @@ jobs:
3742
with:
3843
path: ${{ env.COMPONENT_NAME }}
3944
- name: Compile component
40-
run: make test
45+
run: make test -e instance=${{ matrix.instance }}
4146
golden:
4247
runs-on: ubuntu-latest
48+
strategy:
49+
matrix:
50+
instance:
51+
- defaults
52+
- cattle-system
4353
defaults:
4454
run:
4555
working-directory: ${{ env.COMPONENT_NAME }}
@@ -48,4 +58,4 @@ jobs:
4858
with:
4959
path: ${{ env.COMPONENT_NAME }}
5060
- name: Golden diff
51-
run: make golden-diff
61+
run: make golden-diff -e instance=${{ matrix.instance }}

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@ golden-diff: commodore_args += -f tests/$(instance).yml
7171
golden-diff: clean .compile ## Diff compile output against the reference version. Review output and run `make gen-golden golden-diff` if this target fails.
7272
@git diff --exit-code --minimal --no-index -- tests/golden/$(instance) compiled/
7373

74+
.PHONY: golden-diff-all
75+
golden-diff-all: recursive_target=golden-diff
76+
golden-diff-all: $(test_instances) ## Run golden-diff for all instances. Note: this doesn't work when running make with multiple parallel jobs (-j != 1).
77+
78+
.PHONY: gen-golden-all
79+
gen-golden-all: recursive_target=gen-golden
80+
gen-golden-all: $(test_instances) ## Run gen-golden for all instances. Note: this doesn't work when running make with multiple parallel jobs (-j != 1).
81+
82+
.PHONY: lint_kubent_all
83+
lint_kubent_all: recursive_target=lint_kubent
84+
lint_kubent_all: $(test_instances) ## Lint deprecated Kubernetes API versions for all golden test instances. Will exit on first error. Note: this doesn't work when running make with multiple parallel jobs (-j != 1).
85+
86+
.PHONY: $(test_instances)
87+
$(test_instances):
88+
$(MAKE) $(recursive_target) -e instance=$(basename $(@F))
89+
7490
.PHONY: clean
7591
clean: ## Clean the project
7692
rm -rf .cache compiled dependencies vendor helmcharts jsonnetfile*.json || true

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"postUpgradeTasks": {
1111
"commands": [
12-
"make gen-golden"
12+
"make gen-golden-all"
1313
],
1414
"fileFilters": [ "tests/golden/**" ],
1515
"executionMode": "update"

0 commit comments

Comments
 (0)