diff --git a/.github/workflows/hypha-ci.yml b/.github/workflows/hypha-ci.yml index cf1cf594f6..9ae9181e50 100644 --- a/.github/workflows/hypha-ci.yml +++ b/.github/workflows/hypha-ci.yml @@ -71,9 +71,13 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - name: Install python dependencies - run: pip install `grep "ruff" requirements-dev.txt` - - name: Run python linting + run: pip install `grep -E "ruff|djhtml|black" requirements-dev.txt` + - name: Run ruff run: ruff --format github . + - name: Run black + run: black . --check + - name: Run djhtml + run: djhtml hypha/ --check test-be: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index f8cb2d539f..0f28276fb3 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,6 @@ lint: djhtml hypha/ --check @echo "Checking js and css code style." npm run lint - npx prettier . --check .PHONY: lint-fix diff --git a/package.json b/package.json index 2b01040acc..5ccda56dbb 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "dev:build:tailwind": "tailwindcss -i ./hypha/static_src/src/tailwind/main.css -o ./hypha/static_compiled/css/tailwind-output.css", "dev:build:images": "npm run build:images", "dev:build:fonts": "npm run build:fonts", + "lint:prettier": "prettier . --check", "lint:sass": "stylelint \"hypha/static_src/src/sass/**/*.scss\"", "lint:js": "eslint \"hypha/static_src/src/javascript/**/*.js\"", "collectstatic": "python manage.py collectstatic --no-post-process --noinput --verbosity 0 --settings=hypha.settings.dev",