Lint files #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Lint files | |
# Run workflow on pushes to matching branches | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint_markdown: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Lint Markdown | |
uses: articulate/actions-markdownlint@v1 | |
with: | |
config: .markdownlint.json | |
lint_python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install hatch | |
run: pip install hatch | |
- name: Lint Python | |
run: hatch run lint:all | |
lint_yaml: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Lint YAML | |
uses: karancode/[email protected] | |
with: | |
yamllint_strict: true | |
yamllint_comment: false |