From 4159866528e3ceb06d0b7ef1bdb3dc80ce6d0fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Fri, 15 May 2020 07:28:26 +0800 Subject: [PATCH] docs: update 'Testing redux' in CONTRIBUTING.md (#11386) * docs: update 'Testing redux' in CONTRIBUTING.md try simplfy it to make it more easy for contributor to follow it to test their work by themselves. Signed-off-by: a1012112796 <1012112796@qq.com> * align help message strings Co-authored-by: techknowlogick --- CONTRIBUTING.md | 32 +++++++++++++++----------------- Makefile | 46 +++++++++++++++++++++++----------------------- 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 48d072d8806..f6aa0535115 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,23 +71,21 @@ to make sure your changes don't cause regression elsewhere. Here's how to run the test suite: -- Install the correct version of the drone-cli package. As of this - writing, the correct drone-cli version is - [1.2.0](https://docs.drone.io/cli/install/). -- Ensure you have enough free disk space. You will need at least - 15-20 Gb of free disk space to hold all of the containers drone - creates (a default AWS or GCE disk size won't work -- see - [#6243](https://github.com/go-gitea/gitea/issues/6243)). -- Change into the base directory of your copy of the gitea repository, - and run `drone exec --event pull_request`. -- At the moment `drone exec` doesn't support the Docker Toolbox on Windows 10 - (see [drone-cli#135](https://github.com/drone/drone-cli/issues/135)) - -The drone version, command line, and disk requirements do change over -time (see [#4053](https://github.com/go-gitea/gitea/issues/4053) and -[#6243](https://github.com/go-gitea/gitea/issues/6243)); if you -discover any issues, please feel free to send us a pull request to -update these instructions. +- code lint + +| | | +| :-------------------- | :---------------------------------------------------------------- | +|``make lint`` | lint everything (not suggest if you only change one type code) | +|``make lint-frontend`` | lint frontend files | +|``make lint-backend`` | lint backend files | + +- run test code (Suggest run in linux) + +| | | +| :------------------------------------- | :----------------------------------------------- | +|``make test[\#TestSpecificName]`` | run unit test | +|``make test-sqlite[\#TestSpecificName]``| run [integration](integrations) test for sqlite | +|[More detail message about integrations](integrations/README.md) | ## Vendoring diff --git a/Makefile b/Makefile index 0c63cef9cc6..37c9a46d81a 100644 --- a/Makefile +++ b/Makefile @@ -144,29 +144,29 @@ include docker/Makefile .PHONY: help help: @echo "Make Routines:" - @echo " - \"\" equivalent to \"build\"" - @echo " - build build everything" - @echo " - frontend build frontend files" - @echo " - backend build backend files" - @echo " - clean delete backend and integration files" - @echo " - clean-all delete backend, frontend and integration files" - @echo " - lint lint everything" - @echo " - lint-frontend lint frontend files" - @echo " - lint-backend lint backend files" - @echo " - watch-frontend watch frontend files and continuously rebuild" - @echo " - webpack build webpack files" - @echo " - fomantic build fomantic files" - @echo " - generate run \"go generate\"" - @echo " - fmt format the Go code" - @echo " - generate-swagger generate the swagger spec from code comments" - @echo " - swagger-validate check if the swagger spec is valid" - @echo " - golangci-lint run golangci-lint linter" - @echo " - revive run revive linter" - @echo " - misspell check for misspellings" - @echo " - vet examines Go source code and reports suspicious constructs" - @echo " - test run unit test" - @echo " - test-sqlite run integration test for sqlite" - @echo " - pr# build and start gitea from a PR with integration test data loaded" + @echo " - \"\" equivalent to \"build\"" + @echo " - build build everything" + @echo " - frontend build frontend files" + @echo " - backend build backend files" + @echo " - clean delete backend and integration files" + @echo " - clean-all delete backend, frontend and integration files" + @echo " - lint lint everything" + @echo " - lint-frontend lint frontend files" + @echo " - lint-backend lint backend files" + @echo " - watch-frontend watch frontend files and continuously rebuild" + @echo " - webpack build webpack files" + @echo " - fomantic build fomantic files" + @echo " - generate run \"go generate\"" + @echo " - fmt format the Go code" + @echo " - generate-swagger generate the swagger spec from code comments" + @echo " - swagger-validate check if the swagger spec is valid" + @echo " - golangci-lint run golangci-lint linter" + @echo " - revive run revive linter" + @echo " - misspell check for misspellings" + @echo " - vet examines Go source code and reports suspicious constructs" + @echo " - test[\#TestSpecificName] run unit test" + @echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite" + @echo " - pr# build and start gitea from a PR with integration test data loaded" .PHONY: go-check go-check: