From 76d3f28072a4c08dafa95d4aeaca02fdaaba8a5f Mon Sep 17 00:00:00 2001 From: Yury Tsarev Date: Thu, 4 Jan 2024 09:05:08 +0100 Subject: [PATCH] Setup yamllint * config * make target * github action Signed-off-by: Yury Tsarev --- .github/workflows/yamllint.yaml | 14 ++++++++++++++ .yamllint | 5 +++++ Makefile | 7 ++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/yamllint.yaml create mode 100644 .yamllint diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 0000000..ea41033 --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,14 @@ +name: yamllint +on: [pull_request] +jobs: + yamllint: + name: runner / yamllint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: yamllint + uses: reviewdog/action-yamllint@v1.9.0 + with: + reporter: github-pr-review + yamllint_flags: 'apis' + fail_on_error: true diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..669c864 --- /dev/null +++ b/.yamllint @@ -0,0 +1,5 @@ +extends: default + +rules: + line-length: disable + document-start: disable diff --git a/Makefile b/Makefile index 1f16ca2..2923744 100644 --- a/Makefile +++ b/Makefile @@ -75,4 +75,9 @@ e2e: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) uptes render: crossplane beta render examples/network-xr.yaml apis/basic/composition.yaml examples/function/function.yaml -r -.PHONY: uptest e2e render +yamllint: + @$(INFO) running yamllint + @yamllint ./apis || $(FAIL) + @$(OK) running yamllint + +.PHONY: uptest e2e render yamllint