From 34bd68fa7460611207424421a06e79f60352d9fa Mon Sep 17 00:00:00 2001 From: John Bampton Date: Tue, 15 Dec 2020 08:56:05 +1000 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8D=93=20add=20a=20GitHub=20Actio?= =?UTF-8?q?n=20to=20lint=20the=20YAML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a `.yamllint` config file Run on pull request only --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ .yamllint | 8 ++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .yamllint diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24413aea9be286..1e1df25b32ecc0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -386,7 +386,7 @@ jobs: mkdir .docs npm run ghactionsbootstrap npm run build - + build-browser-isolation: runs-on: ubuntu-latest needs: changes diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000000..c9c0a06378f134 --- /dev/null +++ b/.github/workflows/lint.yml @@ -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 . diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000000000..9c4a22a586eaf3 --- /dev/null +++ b/.yamllint @@ -0,0 +1,8 @@ +--- + +extends: default + +rules: + document-start: disable + line-length: disable + truthy: disable