[CI] Introduce GitHub checks based linting with reviewdog (#900)

* [CI] Introduce linting for branch commits with reviewdog
This utilises the GitHub checks API and could be a potential candidate instead of in-line PR reviews.

* [CI] Change reporter to `github-check`

* [CI] Adjust linting in-line PR commentary to execute with linting step
This commit is contained in:
Amir Zarrinkafsh 2020-04-22 23:10:22 +10:00 committed by GitHub
parent 7e63439c48
commit 0ec3f18b44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -3,8 +3,8 @@
set +u
if [[ $BUILDKITE_PULL_REQUEST != "false" ]]; then
if [[ $BUILDKITE_LABEL == ":hammer_and_wrench: Unit Test" ]]; then
echo "--- :go::service_dog: Linting pull request"
if [[ $BUILDKITE_LABEL == ":service_dog: Linting" ]]; then
echo "--- :go::service_dog: Provide in-line commentary for pull request"
reviewdog -reporter=github-pr-review
fi
fi

View File

@ -26,6 +26,10 @@ env:
CI_BYPASS: ${CI_BYPASS}
steps:
- label: ":service_dog: Linting"
command: "reviewdog -reporter=github-check"
if: build.branch !~ /^(master)|(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true"
- label: ":hammer_and_wrench: Unit Test"
command: "authelia-scripts --log-level debug ci"
if: build.branch !~ /^(master)|(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true"