2020-12-15 09:29:47 +08:00
|
|
|
name: ❄️ Lint
|
|
|
|
|
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
markdownlint:
|
|
|
|
name: 🍇 Markdown
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: 🚀 Use Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12.x'
|
|
|
|
- run: npm install -g markdownlint-cli@0.25.0
|
2021-01-21 16:03:30 +08:00
|
|
|
- run: markdownlint '**/*.md'
|
2020-12-18 08:29:17 +08:00
|
|
|
yamllint:
|
|
|
|
name: 🍺 YAML
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-01-06 09:38:28 +08:00
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
|
|
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install yamllint
|
2020-12-18 08:29:17 +08:00
|
|
|
- name: 🧹 YAML Lint
|
2021-01-06 09:38:28 +08:00
|
|
|
run: |
|
2021-01-26 18:20:39 +08:00
|
|
|
# return non-zero exit code on warnings
|
|
|
|
yamllint --strict .
|
2021-02-16 12:14:46 +08:00
|
|
|
trailing-whitespace:
|
|
|
|
name: 🌌 Trailing whitespace
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: 🧹 Check for trailing whitespace
|
|
|
|
run: "! git grep -EIn $'[ \t]+$' | grep -v 'received: '"
|