mirror of https://github.com/knative/func.git
chore: adds makefile target for embedded FS check (#2915)
This commit is contained in:
parent
879233d668
commit
96269d0308
|
@ -1,10 +1,10 @@
|
||||||
name: Func Embedded FS Test
|
name: Func Check Embedded FS
|
||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Func Embedded FS Test
|
name: Func Check Embedded FS
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: ["ubuntu-latest"]
|
os: ["ubuntu-latest"]
|
||||||
|
@ -14,7 +14,7 @@ jobs:
|
||||||
- uses: knative/actions/setup-go@main
|
- uses: knative/actions/setup-go@main
|
||||||
- name: Check embedded templates content
|
- name: Check embedded templates content
|
||||||
run: |
|
run: |
|
||||||
if ! go test -run "^\QTestFileSystems\E$/^\Qembedded\E$" ./pkg/filesystem; then
|
if ! make check-embedded-fs; then
|
||||||
echo "Content of templates directory and embedded FS (zz_filesystem_generated.go) doesn't match!"
|
echo "Content of templates directory and embedded FS (zz_filesystem_generated.go) doesn't match!"
|
||||||
echo "Consult https:.github.com/knative/func/blob/main/docs/CONTRIBUTING.md#templates ."
|
echo "Consult https:.github.com/knative/func/blob/main/docs/CONTRIBUTING.md#templates ."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -133,6 +133,10 @@ presubmit-unit-tests: ## Run prow presubmit unit tests locally
|
||||||
##@ Templates
|
##@ Templates
|
||||||
#############
|
#############
|
||||||
|
|
||||||
|
.PHONY: check-embedded-fs
|
||||||
|
check-embedded-fs: ## Check the embedded templates FS
|
||||||
|
go test -run "^\QTestFileSystems\E$$/^\Qembedded\E$$" ./pkg/filesystem
|
||||||
|
|
||||||
# TODO: add linters for other templates
|
# TODO: add linters for other templates
|
||||||
.PHONY: check-templates
|
.PHONY: check-templates
|
||||||
check-templates: check-go check-rust ## Run template source code checks
|
check-templates: check-go check-rust ## Run template source code checks
|
||||||
|
|
Loading…
Reference in New Issue