Add initial implementations for forms and organization apps with serializers, factories, and admin configurations
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
This commit is contained in:
@@ -1,46 +1,64 @@
|
||||
default_install_hook_types: [pre-commit, pre-push]
|
||||
default_stages: [pre-commit]
|
||||
minimum_pre_commit_version: "3.6.0"
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.14
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff lint (src only)
|
||||
files: ^src/.*\.py$
|
||||
name: ruff lint
|
||||
files: ^(src|tests|scripts)/.*\.py$
|
||||
args: [--fix, --exit-non-zero-on-fix]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/.*/migrations/.*|
|
||||
src/.*/__pycache__/.*
|
||||
.*/__pycache__/.*
|
||||
)$
|
||||
|
||||
- id: ruff-format
|
||||
name: ruff format (src only)
|
||||
files: ^src/.*\.py$
|
||||
name: ruff format
|
||||
files: ^(src|tests|scripts)/.*\.py$
|
||||
args: []
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/.*/migrations/.*|
|
||||
src/.*/__pycache__/.*
|
||||
.*/__pycache__/.*
|
||||
)$
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
name: check trailing whitespace (src only)
|
||||
files: ^src/.*\.(py|txt|md|yaml|yml)$
|
||||
name: check trailing whitespace
|
||||
|
||||
- id: end-of-file-fixer
|
||||
name: fix end of file (src only)
|
||||
files: ^src/.*\.(py|txt|md|yaml|yml)$
|
||||
name: fix end of file
|
||||
|
||||
- id: check-yaml
|
||||
name: check yaml syntax (src only)
|
||||
files: ^src/.*\.ya?ml$
|
||||
name: check yaml syntax
|
||||
files: ^(\.gitea/workflows/.*\.ya?ml|docker-compose.*\.ya?ml|.*\.ya?ml)$
|
||||
|
||||
- id: check-added-large-files
|
||||
name: check large files
|
||||
args: ["--maxkb=500"]
|
||||
|
||||
- id: check-merge-conflict
|
||||
- id: detect-private-key
|
||||
|
||||
- repo: https://github.com/hadolint/hadolint
|
||||
rev: v2.12.0
|
||||
hooks:
|
||||
- id: hadolint-docker
|
||||
name: hadolint dockerfiles
|
||||
files: ^docker/.*Dockerfile.*$
|
||||
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.11.0.1
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
files: ^(scripts|docker/scripts)/.*\.sh$
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: django-check-migrations
|
||||
@@ -54,3 +72,22 @@ repos:
|
||||
src/.*/migrations/.*|
|
||||
src/.*/__pycache__/.*
|
||||
)$
|
||||
- id: docker-compose-dev-config
|
||||
name: docker compose dev config check
|
||||
entry: docker compose -f docker-compose.dev.yml config -q
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: ^(docker-compose\.dev\.yml|docker/Dockerfile|docker/scripts/.*\.sh)$
|
||||
- id: docker-compose-prod-config
|
||||
name: docker compose prod config check
|
||||
entry: docker compose -f docker-compose.prod.yml --env-file .env.prod config -q
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: ^(docker-compose\.prod\.yml|docker/Dockerfile|docker/scripts/.*\.sh|\.env\.prod)$
|
||||
- id: pytest
|
||||
name: pytest suite
|
||||
entry: ./scripts/run-tests.sh
|
||||
language: script
|
||||
pass_filenames: false
|
||||
stages: [pre-push]
|
||||
always_run: true
|
||||
|
||||
Reference in New Issue
Block a user