Skip to content

Commit 96269d0

Browse files
authored
chore: adds makefile target for embedded FS check (knative#2915)
1 parent 879233d commit 96269d0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/test-embedded-fs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Func Embedded FS Test
1+
name: Func Check Embedded FS
22

33
on: [pull_request]
44

55
jobs:
66
test:
7-
name: Func Embedded FS Test
7+
name: Func Check Embedded FS
88
strategy:
99
matrix:
1010
os: ["ubuntu-latest"]
@@ -14,7 +14,7 @@ jobs:
1414
- uses: knative/actions/setup-go@main
1515
- name: Check embedded templates content
1616
run: |
17-
if ! go test -run "^\QTestFileSystems\E$/^\Qembedded\E$" ./pkg/filesystem; then
17+
if ! make check-embedded-fs; then
1818
echo "Content of templates directory and embedded FS (zz_filesystem_generated.go) doesn't match!"
1919
echo "Consult https:.github.com/knative/func/blob/main/docs/CONTRIBUTING.md#templates ."
2020
exit 1

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ presubmit-unit-tests: ## Run prow presubmit unit tests locally
133133
##@ Templates
134134
#############
135135

136+
.PHONY: check-embedded-fs
137+
check-embedded-fs: ## Check the embedded templates FS
138+
go test -run "^\QTestFileSystems\E$$/^\Qembedded\E$$" ./pkg/filesystem
139+
136140
# TODO: add linters for other templates
137141
.PHONY: check-templates
138142
check-templates: check-go check-rust ## Run template source code checks

0 commit comments

Comments
 (0)