chore: Check for readme changes in each PR (#11495)

This commit is contained in:
Sebastian Spaink 2022-07-12 15:30:53 -05:00 committed by GitHub
parent b44004510d
commit 19b77ad507
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 3 deletions

View File

@ -180,6 +180,7 @@ jobs:
- restore_cache: - restore_cache:
key: go-mod-v1-{{ checksum "go.sum" }} key: go-mod-v1-{{ checksum "go.sum" }}
- check-changed-files-or-halt - check-changed-files-or-halt
- run: ./scripts/make_docs.sh
- run: 'make deps' - run: 'make deps'
- run: 'make tidy' - run: 'make tidy'
- run: 'make check' - run: 'make check'

View File

@ -1,4 +1,13 @@
### Required for all PRs: # Required for all PRs
<!-- Before opening a pull request you should run the following checks to make sure the CI will pass.
make check
make check-deps
make test
make docs
-->
<!-- Complete the tasks in the following list. Change [ ] to [x] to <!-- Complete the tasks in the following list. Change [ ] to [x] to
show completion. --> show completion. -->

View File

@ -68,12 +68,13 @@ Telegraf uses Go modules. Assuming you can already build the project, run this i
**Unit Tests:** **Unit Tests:**
Before opening a pull request you should run the linter checks and Before opening a pull request you should run the following checks to make sure the CI will pass.
the short tests.
```shell ```shell
make check make check
make check-deps
make test make test
make docs
``` ```
**Execute integration tests:** **Execute integration tests:**

10
scripts/make_docs.sh Executable file
View File

@ -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