mirror of https://github.com/databricks/cli.git
ef86d2bcae
On main branch: ‘make test’ takes about 33s On this branch: ‘make test’ takes about 2.7s (all measurements are for hot cache) What’s done (from highest impact to lowest): - Remove -coverprofile= option - this option was disabling "go test"'s built-in cache and also it took extra time to calculate the coverage (extra 21s). - Exclude ./integration/ folder, there are no unit tests there, but having it included adds significant time. "go test"'s caching also does not work there for me, due to TestMain() presence (extra 7.2s). - Remove dependency on "make lint" - nice to have, but slow to re-check the whole repo and should already be done by IDE (extra 2.5s). - Remove dependency on "make vendor" — rarely needed; on CI it is already executed separately (extra 1.1s). The coverage option is still available under "make cover". Use "make showcover" to show it. I’ve also removed separate "make testonly". If you only want tests, run "make test". If you want lint+test run "make lint test" etc. I've also modified the test command, removed unnecessary -short, -v, --raw-command. |
||
---|---|---|
.. | ||
ISSUE_TEMPLATE | ||
workflows | ||
CODEOWNERS | ||
PULL_REQUEST_TEMPLATE.md | ||
dependabot.yml |