Skip to content

Commit

Permalink
Merge pull request #528 from rollandf/git-diff
Browse files Browse the repository at this point in the history
Add CI check for generated files
  • Loading branch information
e0ne committed May 22, 2023
2 parents 8789a2e + 98ce708 commit 4c2942d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ jobs:
uses: actions/checkout@v3
- name: lint helm chart
run: make lint-helm
diff-manifests:
name: check manifests
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: checkout
uses: actions/checkout@v3
- name: check manifests
run: make check-manifests
diff-release-build:
name: check release-build
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: checkout
uses: actions/checkout@v3
- name: check release-build
run: make check-release-build
unit-tests:
name: Unit-tests
runs-on: ubuntu-20.04
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ lint-dockerfile: $(HADOLINT) ; $(info running Dockerfile lint with hadolint...)
lint-helm: $(HELM) ; $(info running lint for helm charts...) @ ## Run helm lint
$Q $(HELM) lint $(CHART_PATH)

.PHONY: check-manifests
check-manifests: generate manifests
$(info checking for git diff after running 'make manifests')
git diff --quiet ; if [ $$? -eq 1 ] ; then echo "Please, commit manifests after running 'make manifests' command"; exit 1 ; fi

.PHONY: check-release-build
check-release-build: release-build
$(info checking for git diff after running 'make release-build')
git diff --quiet ; if [ $$? -eq 1 ] ; then echo "Please, commit templates after running 'make release-build' command"; exit 1 ; fi

TEST_TARGETS := test-default test-bench test-short test-verbose test-race
.PHONY: $(TEST_TARGETS) test-xml check test tests
test-bench: ARGS=-run=__absolutelynothing__ -bench=. ## Run benchmarks
Expand Down

0 comments on commit 4c2942d

Please sign in to comment.