diff --git a/.circleci/config.yml b/.circleci/config.yml index 6dd5e7fbf..ead07e351 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -180,6 +180,7 @@ jobs: - restore_cache: key: go-mod-v1-{{ checksum "go.sum" }} - check-changed-files-or-halt + - run: ./scripts/make_docs.sh - run: 'make deps' - run: 'make tidy' - run: 'make check' diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 67b65a262..88be554bd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,13 @@ -### Required for all PRs: +# Required for all PRs + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4323b07ca..c26a18050 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,12 +68,13 @@ Telegraf uses Go modules. Assuming you can already build the project, run this i **Unit Tests:** -Before opening a pull request you should run the linter checks and -the short tests. +Before opening a pull request you should run the following checks to make sure the CI will pass. ```shell make check +make check-deps make test +make docs ``` **Execute integration tests:** diff --git a/scripts/make_docs.sh b/scripts/make_docs.sh new file mode 100755 index 000000000..a17fa437c --- /dev/null +++ b/scripts/make_docs.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +make docs + +if [ "$(git status --porcelain | wc -l)" -eq "0" ]; then + echo "🟢 Git repo is clean." +else + echo "🔴 Git repo dirty. Please run \"make docs\" and push the updated README. Failing CI." + exit 1 +fi