-
Notifications
You must be signed in to change notification settings - Fork 43
53 lines (50 loc) · 2.42 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: ci
on: [pull_request]
jobs:
pull:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
- name: "Check file encoding"
run:
git remote add upstream https://github.com/pingcap/blog.git;
git fetch upstream;
wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/check-file-encoding.py;
python3 check-file-encoding.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*')
- name: "Check front matters"
run:
pip3 install python-frontmatter;
python3 ./hack/check-front-matters.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*')
- name: Markdown lint
uses: avto-dev/markdown-lint@v1
with:
config: './.github/markdownlint.yml'
args: '.'
- name: "Check control characters"
run:
wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/check-control-char.py;
python3 check-control-char.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*')
- name: "Check unclosed tags"
run:
wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/check-tags.py;
python3 check-tags.py $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- '*.md' ':(exclude).github/*')
- name: "Check Chinese punctuation"
run:
wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/check-zh-punctuation.py;
pip3 install zhon;
python3 check-zh-punctuation.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*')
- name: Verify internal links
run: ./hack/verify-links-doc.sh
#- name: Verify internal link anchors
# run: ./hack/verify-link-anchors.sh
- name: "Check manual line breaks"
run:
wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/check-manual-line-breaks.py;
python3 check-manual-line-breaks.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*')
- name: "Check < symbols"
run:
python3 ./hack/check-special-marks.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*')