Added markdownlint as part of Github Actions #74
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
name: VCMI | |
on: | |
push: | |
branches: | |
- beta | |
- master | |
- develop | |
pull_request: | |
workflow_dispatch: | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
validate-code: | |
if: always() | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Ensure LF line endings | |
run: | | |
find . -path ./.git -prune -o -path ./AI/FuzzyLite -prune -o -path ./test/googletest \ | |
-o -path ./osx -prune -o -type f \ | |
-not -name '*.png' -and -not -name '*.ttf' -and -not -name '*.wav' -and -not -name '*.webm' -and -not -name '*.ico' -and -not -name '*.bat' -print0 | \ | |
{ ! xargs -0 grep -l -z -P '\r\n'; } | |
- name: Validate JSON | |
run: | | |
sudo apt install python3-jstyleson | |
python3 CI/validate_json.py | |
- name: Validate Markdown | |
uses: DavidAnson/markdownlint-cli2-action@v18 | |
with: | |
config: 'CI/example.markdownlint-cli2.jsonc' | |
globs: '**/*.md' |