Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure pre commit hooks in CI #106

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/workflows/format-and-lint.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pre-commit CI

on: [push, pull_request]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: pip install -r requirements.txt

# This will configure the pre-commit hooks in
# '.pre-commit-config.yaml' file.
- name: Configure pre-commit
run: pre-commit install

- name: Run pre-commit hooks
run: pre-commit run --all-files
6 changes: 3 additions & 3 deletions create_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def __init__(self, message):
crawler.close()
if not relations_count_new > relations_count:
error_message = (
f"Unexpected relation count change in the crawler '{name}': "
f"Expected new relations ({relations_count_new}) "
f"to be greater than the previous relations ({relations_count})."
f'Unexpected relation count change in the crawler "{name}": '
f'Expected new relations ({relations_count_new}) '
f'to be greater than the previous relations ({relations_count}).'
)
raise RelationCountError(error_message)
status[module_name] = 'OK'
Expand Down