-
Notifications
You must be signed in to change notification settings - Fork 63
46 lines (42 loc) · 2.01 KB
/
ci.yaml
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
name: ci
on: [pull_request]
jobs:
pull:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: "Check file encoding"
run:
git remote add upstream https://github.com/pingcap/docs-dm.git;
git fetch upstream;
wget https://raw.githubusercontent.com/CharLotteiu/pingcap-docs-checks/main/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 git conflicts"
run:
wget https://raw.githubusercontent.com/CharLotteiu/pingcap-docs-checks/main/check-conflicts.py;
python3 check-conflicts.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' '*.yml' '*.yaml')
- name: Markdown lint
uses: avto-dev/markdown-lint@v1
with:
config: './.markdownlint.yaml'
args: '.'
- name: Verify internal links
run: ./hack/verify-links.sh
- name: Verify internal link anchors
run: ./hack/verify-link-anchors.sh
- name: "Check control characters"
run:
wget https://raw.githubusercontent.com/CharLotteiu/pingcap-docs-checks/main/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/CharLotteiu/pingcap-docs-checks/main/check-tags.py;
python3 check-tags.py $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'zh/' 'en/' '.md' ':(exclude).github/*')
- name: "Check manual line breaks"
run:
wget https://raw.githubusercontent.com/CharLotteiu/pingcap-docs-checks/main/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/*')