forked from alibaba/Sentinel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: make Circle CI to linter repo details (alibaba#344)
Signed-off-by: Allen Sun <[email protected]>
- Loading branch information
1 parent
172923a
commit 9b99e06
Showing
1 changed file
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,53 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
integration-test: | ||
docker: | ||
- image: circleci/openjdk:8-jdk | ||
|
||
working_directory: ~/sentinel | ||
|
||
environment: | ||
MAVEN_OPTS: -Xmx3200m | ||
steps: | ||
- checkout | ||
# Run tests | ||
- run: mvn integration-test | ||
|
||
document-lint: | ||
docker: | ||
# this image is build from Dockerfile | ||
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile | ||
- image: pouchcontainer/pouchlinter:v0.1.2 | ||
working_directory: ~/sentinel | ||
steps: | ||
- checkout | ||
- run: | ||
name: use markdownlint v0.5.0 to lint markdown file (https://github.com/markdownlint/markdownlint) | ||
command: | | ||
find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036 | ||
- run: | ||
name: use markdown-link-check(https://github.com/tcort/markdown-link-check) to check links in markdown files | ||
command: | | ||
set +e | ||
for name in $(find . -name \*.md | grep -v vendor | grep -v CHANGELOG); do | ||
if [ -f $name ]; then | ||
markdown-link-check -q $name; | ||
if [ $? -ne 0 ]; then | ||
code=1 | ||
fi | ||
fi | ||
done | ||
bash -c "exit $code"; | ||
- run: | ||
name: use opensource tool client9/misspell to correct commonly misspelled English words | ||
command: | | ||
find ./* -name "*" | grep -v vendor | xargs misspell -error | ||
- run: | ||
name: use ShellCheck (https://github.com/koalaman/shellcheck) to check the validateness of shell scripts in pouch repo | ||
command: | | ||
find ./ -name "*.sh" | grep -v vendor | xargs shellcheck | ||
# Run tests | ||
- run: mvn integration-test | ||
workflows: | ||
version: 2 | ||
ci: | ||
jobs: | ||
- integration-test | ||
- document-lint |