Skip to content

Commit

Permalink
feat: 🍓 add a GitHub Action to lint the YAML
Browse files Browse the repository at this point in the history
Add a `.yamllint` config file
Run on pull request only
  • Loading branch information
jbampton committed Feb 13, 2021
1 parent 8eac925 commit 34bd68f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ jobs:
mkdir .docs
npm run ghactionsbootstrap
npm run build
build-browser-isolation:
runs-on: ubuntu-latest
needs: changes
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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 .
8 changes: 8 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

extends: default

rules:
document-start: disable
line-length: disable
truthy: disable

0 comments on commit 34bd68f

Please sign in to comment.