Skip to content

Commit

Permalink
ci(workflows): update github and pre commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ultrabug committed Jul 29, 2023
1 parent 1569a2c commit 08d6c48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions .git-hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,8 @@
# $ git config core.hooksPath .git-hooks # (in dir) to add hooks
# $ git config --unset core.hooksPath # (in dir) to remove hooks

if command -v black &>/dev/null; then
black --diff --check --quiet py3status/ || exit 1
black --diff --check --quiet setup.py fastentrypoints.py || exit 1
black --diff --check --quiet tests/ || exit 1
if command -v hatch &>/dev/null; then
hatch run all
else
echo 'hooks/pre-push: command "black" not found, skipping black tests'
fi

if command -v pytest &>/dev/null; then
pytest --flake8 || exit 1
else
echo 'hooks/pre-push: command "pytest" not found, skipping flake8 tests'
echo 'hooks/pre-push: command "hatch" not found, skipping hatch tests'
fi
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
pip install -r requirements/project.txt
- name: Test with hatch
run: hatch run all

0 comments on commit 08d6c48

Please sign in to comment.