Compare commits
3 Commits
dcacff303d
..
ci
| Author | SHA1 | Date | |
|---|---|---|---|
| adada84e9a | |||
| 8cb0554696 | |||
| 947d9f740c |
+11
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user