From 6e95494f66814cfc4630555ee073e18294ba34fa Mon Sep 17 00:00:00 2001 From: Johanna England Date: Fri, 29 Nov 2024 10:30:04 +0100 Subject: [PATCH] Add workflow to check formatting using djLint --- .github/workflows/format.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 670b1b06c..75dbb3f24 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,4 +1,4 @@ -name: Format codebase +name: Verify formatting on: push: @@ -6,14 +6,30 @@ on: 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