Skip to content
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- run:
name: Run linting
command: |
flake8 shift/ shift_table/ --max-line-length=120 --ignore=E501,W503 || echo "Linting completed"
flake8 shift/ shift_table/ || echo "Linting completed"
black --check shift/ shift_table/ || echo "Black check completed"

security:
Expand Down
9 changes: 9 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[flake8]
max-line-length = 120
ignore = W503
per-file-ignores =
shift_table/settings_test.py:F403,F405
shift/test_files/test_direct_password_change.py:E402
shift/test_files/test_models.py:E402
shift/test_files/test_e2e.py:E402
shift/test_files/test_views.py:E402
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on:
push:
branches: [main, develop]
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -r requirements.txt -r requirements-dev.txt
- run: flake8 shift/ shift_table/
- run: black --check shift/ shift_table/

test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -r requirements.txt -r requirements-dev.txt
- run: pytest shift/test_files/ --cov=shift --cov=shift_table --cov-report=term-missing
Comment thread
cursor[bot] marked this conversation as resolved.
env:
DJANGO_SETTINGS_MODULE: shift_table.settings_test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test-e2e: ## Run end-to-end tests
$(EXEC_CMD) python manage.py test shift.test_files.test_e2e --settings=shift_table.settings_test

lint: ## Run linting
$(EXEC_CMD) flake8 shift/ shift_table/ --max-line-length=120 --ignore=E501,W503
$(EXEC_CMD) flake8 shift/ shift_table/
$(EXEC_CMD) black --check shift/ shift_table/

format: ## Format code
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
pytest>=7.0.0
pytest-django>=4.5.0
pytest-cov>=4.0.0
pytest-xdist>=3.0.0
factory-boy>=3.3.0
selenium>=4.15.0
webdriver-manager>=4.0.0
Expand Down
Loading
Loading