Skip to content

Commit

Permalink
Add CI for checking markdown format. (#308)
Browse files Browse the repository at this point in the history
Signed-off-by: ChenYing Kuo <[email protected]>
  • Loading branch information
evshary authored Dec 18, 2024
1 parent 53f5d68 commit e855d57
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 315 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ jobs:
- name: Run tests
run: cargo test --verbose

markdown_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v18
with:
config: '.markdownlint.yaml'
globs: '**/README.md'

# NOTE: In GitHub repository settings, the "Require status checks to pass
# before merging" branch protection rule ensures that commits are only merged
# from branches where specific status checks have passed. These checks are
Expand All @@ -59,7 +68,7 @@ jobs:
ci:
name: CI status checks
runs-on: ubuntu-latest
needs: build
needs: [build, markdown_lint]
if: always()
steps:
- name: Check whether all jobs pass
Expand Down
7 changes: 7 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"MD013": false, # Line length limitation
"MD024": false, # Allow multiple headings with the same content
"MD033": false, # Enable Inline HTML
"MD041": false, # Allow first line heading
"MD045": false, # Allow Images have no alternate text
}
Loading

0 comments on commit e855d57

Please sign in to comment.