From 3ffbf8ba363200cb669caba0477025cb1f552d58 Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Thu, 9 May 2024 09:26:55 +0200 Subject: [PATCH] add makefile --- CONTRIBUTING.md | 8 +++++--- Makefile | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 Makefile diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab932d911..80de566a5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,8 +6,10 @@ Your contributions to Ginkgo are essential for its long-term maintenance and imp - Ensure adequate test coverage: - When adding to the Ginkgo library, add unit and/or integration tests (under the `integration` folder). - When adding to the Ginkgo CLI, note that there are very few unit tests. Please add an integration test. -- Make sure all the tests succeed via `ginkgo -r -p` -- Vet your changes via `go vet ./...` -- Update the documentation. Ginkgo uses `godoc` comments and documentation in `docs/index.md`. You can run `bundle exec jekyll serve` in the `docs` directory to preview your changes. +- Run `make` or: + - Install ginkgo locally via `go install ./...` + - Make sure all the tests succeed via `ginkgo -r -p` + - Vet your changes via `go vet ./...` +- Update the documentation. Ginkgo uses `godoc` comments and documentation in `docs/index.md`. You can run `bundle && bundle exec jekyll serve` in the `docs` directory to preview your changes. Thanks for supporting Ginkgo! diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..93eb2e515 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +# default task since it's first +.PHONY: all +all: install vet test + +.PHONY: install +install: + which ginkgo 2>&1 >/dev/null || go install ./... + +.PHONY: test +test: + ginkgo -r -p + +.PHONY: vet +vet: + go vet ./...