Skip to content

Commit

Permalink
Update yamllint-chart target to handle missing dist/chart
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthaksarthak9 committed Jan 21, 2025
1 parent 9d93a04 commit a10b6b1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/lint-sample.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint Samples
name: Lint Samples and Yaml Files

on:
push:
Expand Down Expand Up @@ -42,3 +42,17 @@ jobs:
working-directory: ${{ matrix.folder }}
run: make lint

lint-yaml:
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v4
- name: Install Docker
run: |
sudo apt-get update
sudo apt-get install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker
- name: Run yamllint for chart files
run: make yamllint-chart

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ golangci-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.63.4 ;\
}

.PHONY: yamllint-chart
yamllint-chart:
@files=$$(find testdata/project-v4-with-plugins/dist/chart -name '*.yaml'); \
docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest $$files -d "{extends: relaxed, rules: {line-length: {max: 120}}}" --no-warnings

.PHONY: apidiff
apidiff: go-apidiff ## Run the go-apidiff to verify any API differences compared with origin/master
$(GOBIN)/go-apidiff master --compare-imports --print-compatible --repo-path=.
Expand Down

0 comments on commit a10b6b1

Please sign in to comment.