Skip to content

Commit

Permalink
Add CI checks for code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
theskumar committed Sep 8, 2023
1 parent 54dffcd commit 04a20de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/hypha-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ lint:
djhtml hypha/ --check
@echo "Checking js and css code style."
npm run lint
npx prettier . --check


.PHONY: lint-fix
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 04a20de

Please sign in to comment.