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

25 lines
733 B
YAML

name: Func Embedded FS Test
on: [pull_request]
jobs:
test:
name: Func Embedded FS Test
strategy:
matrix:
go: [1.18.x]
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check embedded templates content
run: |
if ! go test -run "^\QTestFileSystems\E$/^\Qembedded\E$"; then
echo "Content of templates directory and embedded FS (zz_filesystem_generated.go) doesn't match!"
echo "Consult https://github.com/knative-sandbox/kn-plugin-func/blob/main/docs/CONTRIBUTING.md#templates ."
exit 1
fi