Compare commits

..

3 Commits

Author SHA1 Message Date
michal adada84e9a Add test step to CI
continuous-integration/drone/push Build is passing
2023-02-17 15:41:59 +01:00
michal 8cb0554696 Add pre-commit config
continuous-integration/drone/push Build is passing
2023-02-17 15:21:26 +01:00
michal 947d9f740c fix after changing null -> blank 2023-02-17 15:21:04 +01:00
2 changed files with 51 additions and 0 deletions
+11
View File
@@ -3,6 +3,17 @@ type: docker
name: default name: default
steps: steps:
- name: test
image: python:3.10
commands:
- pip3 install poetry
- poetry install --no-root
- export SECRET_KEY=$(openssl rand -hex 32)
- export DATABASE_URL=sqlite://$(mktemp)/db.sqlite3
- poetry run ./manage.py test
environment:
ALLOWED_HOSTS: localhost,127.0.0.1
DEBUG: True
- name: deploy - name: deploy
image: caprover/cli-caprover:2.2.3 image: caprover/cli-caprover:2.2.3
commands: commands:
+40
View File
@@ -0,0 +1,40 @@
repos:
- repo: local
hooks:
- id: poetry
name: poetry
language: system
entry: poetry check
files: '^(pyproject.toml|poetry.lock)$'
pass_filenames: false
# - id: black
# name: black
# language: system
# entry: poetry run black --target-version py39
# types_or: [python, pyi]
# require_serial: true
# - id: isort
# name: isort
# language: system
# entry: poetry run isort --profile black --python-version 39
# types_or: [cython, pyi, python]
# require_serial: true
# - id: flake8
# name: flake8
# language: system
# entry: poetry run flake8
# types_or: [python]
# files: "^.*\\.py$"
# - id: mypy
# name: mypy
# language: system
# entry: poetry run mypy --strict --python-version 3.9
# types_or: [python, pyi]
# files: "^.*\\.pyi?$"
- id: test
name: test
language: system
entry: poetry run ./manage.py test
types_or: [python]
files: "^.*\\.py$"
pass_filenames: false