Skip to content

Commit

Permalink
Run pre-commits instead of black in ci
Browse files Browse the repository at this point in the history
also run it against all files
  • Loading branch information
danialkeimasi committed Sep 25, 2023
1 parent d1ef585 commit 29c8768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,14 @@ name: Tests
on: [push, pull_request, workflow_dispatch]

jobs:
formatting:
name: Check Black Formatting
pre-commit:
name: Run pre-commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install black
run: |
python -m pip install --upgrade pip
pip install black
- name: Check code formatting with black
run: |
black --check --diff --color django_pwned tests setup.py
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]

test:
name: Test
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from django_pwned import __version__

with open(os.path.join(os.path.dirname(__file__), "README.md"), "r", encoding="UTF-8") as readme:
with open(os.path.join(os.path.dirname(__file__), "README.md"), encoding="UTF-8") as readme:
README = readme.read()

# allow setup.py to be run from any path
Expand Down

1 comment on commit 29c8768

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
django_pwned
   validators.py45198%44
TOTAL218199% 

Tests Skipped Failures Errors Time
13 0 💤 0 ❌ 0 🔥 0.534s ⏱️

Please sign in to comment.