Skip to content

Commit

Permalink
Add workflow to check formatting using djLint
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Dec 3, 2024
1 parent eb6b1ec commit 6e95494
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
name: Format codebase
name: Verify formatting

on:
push:
branches: master
pull_request:

jobs:
format:
ruff:
runs-on: ubuntu-latest
name: Format
name: Verify Python formatting
steps:
- uses: actions/checkout@v4

- name: Format
uses: astral-sh/ruff-action@v1
- uses: astral-sh/ruff-action@v1
with:
args: "format --check"
changed-files: 'true'

djlint:
runs-on: ubuntu-latest
name: Check HTML formatting
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5

- name: Install dependencies
run: |
pip install -U pip
pip install djlint
- name: Format HTML
run: djlint . --check

0 comments on commit 6e95494

Please sign in to comment.