Lint
This commit is contained in:
3
.github/workflows/validate_blueprint.yml
vendored
3
.github/workflows/validate_blueprint.yml
vendored
@@ -1,5 +1,7 @@
|
|||||||
|
---
|
||||||
name: Validate Blueprint YAML
|
name: Validate Blueprint YAML
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
@@ -19,3 +21,4 @@ jobs:
|
|||||||
- uses: actions/checkout@v4.1.0
|
- uses: actions/checkout@v4.1.0
|
||||||
- name: Validate nspanel_blueprint.yaml
|
- name: Validate nspanel_blueprint.yaml
|
||||||
run: yamllint -c "./.rules/yamllint.yml" nspanel_blueprint.yaml
|
run: yamllint -c "./.rules/yamllint.yml" nspanel_blueprint.yaml
|
||||||
|
...
|
||||||
|
|||||||
3
.github/workflows/validate_esphome.yml
vendored
3
.github/workflows/validate_esphome.yml
vendored
@@ -1,5 +1,7 @@
|
|||||||
|
---
|
||||||
name: Validate ESPHome
|
name: Validate ESPHome
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
@@ -150,3 +152,4 @@ jobs:
|
|||||||
uses: esphome/build-action@v1.8.0
|
uses: esphome/build-action@v1.8.0
|
||||||
with:
|
with:
|
||||||
yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml"
|
yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml"
|
||||||
|
...
|
||||||
|
|||||||
3
.github/workflows/validate_esphome_beta.yml
vendored
3
.github/workflows/validate_esphome_beta.yml
vendored
@@ -1,5 +1,7 @@
|
|||||||
|
---
|
||||||
name: Validate ESPHome (beta)
|
name: Validate ESPHome (beta)
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
@@ -151,3 +153,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml"
|
yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml"
|
||||||
version: beta
|
version: beta
|
||||||
|
...
|
||||||
|
|||||||
57
.github/workflows/validate_markdown.yml
vendored
57
.github/workflows/validate_markdown.yml
vendored
@@ -1,5 +1,7 @@
|
|||||||
|
---
|
||||||
name: Validate Markdown
|
name: Validate Markdown
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
@@ -14,37 +16,38 @@ jobs:
|
|||||||
name: Markdown Lint
|
name: Markdown Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.0
|
||||||
|
|
||||||
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
||||||
- name: Identify changed files
|
- name: Identify changed files
|
||||||
uses: tj-actions/changed-files@v41
|
uses: tj-actions/changed-files@v41
|
||||||
id: changed-files
|
id: changed-files
|
||||||
with:
|
with:
|
||||||
files: '**/*.md'
|
files: '**/*.md'
|
||||||
separator: ","
|
separator: ","
|
||||||
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
||||||
- name: Markdown Lint
|
- name: Markdown Lint
|
||||||
uses: DavidAnson/markdownlint-cli2-action@v14
|
uses: DavidAnson/markdownlint-cli2-action@v14
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
with:
|
with:
|
||||||
globs: ${{ steps.changed-files.outputs.all_changed_files }}
|
globs: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
separator: ","
|
separator: ","
|
||||||
config: '.rules/.markdownlint.jsonc'
|
config: '.rules/.markdownlint.jsonc'
|
||||||
fix: true
|
fix: true
|
||||||
|
|
||||||
markdown-links:
|
markdown-links:
|
||||||
name: Check links
|
name: Check links
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.0
|
||||||
|
|
||||||
# https://github.com/gaurav-nelson/github-action-markdown-link-check
|
# https://github.com/gaurav-nelson/github-action-markdown-link-check
|
||||||
- name: Markdown links
|
- name: Markdown links
|
||||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||||
with:
|
with:
|
||||||
check-modified-files-only: yes
|
check-modified-files-only: yes
|
||||||
config-file: '.rules/mlc_config.json'
|
config-file: '.rules/mlc_config.json'
|
||||||
base-branch: 'main'
|
base-branch: 'main'
|
||||||
|
...
|
||||||
|
|||||||
Reference in New Issue
Block a user