Adding djlint gh action #2
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: Backend Tests | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
#---------------------------------------------- | |
# check-out repo and set-up python | |
#---------------------------------------------- | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# install and configure poetry | |
#---------------------------------------------- | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.5.1 | |
virtualenvs-create: false | |
virtualenvs-in-project: false | |
installer-parallel: true | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install project | |
run: poetry install --no-interaction | |
#---------------------------------------------- | |
# run djlint | |
#---------------------------------------------- | |
- name: Run djLint | |
run: | | |
source .venv/bin/activate | |
poetry run djlint ./frontend/templates/ --check --profile=django |