mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 06:42:10 +08:00
feat(CI): add a GitHub Action to lint the YAML files
Add a `.yamllint` config file Lint YAML. https://yamllint.readthedocs.io/en/stable/
This commit is contained in:
parent
1bdf86b722
commit
4bd0b4dc96
22
.github/workflows/lint.yml
vendored
Normal file
22
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Lint
|
||||||
|
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
yamllint:
|
||||||
|
name: YAML
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- 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
|
||||||
|
- name: YAML Lint
|
||||||
|
run: |
|
||||||
|
# return non-zero exit code on warnings
|
||||||
|
yamllint --strict .
|
Loading…
x
Reference in New Issue
Block a user