File: Makefile

package info (click to toggle)
ormar 0.20.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,136 kB
  • sloc: python: 23,758; makefile: 34; sh: 14
file content (36 lines) | stat: -rw-r--r-- 983 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
test_all: test_pg test_mysql test_sqlite

test_pg: export DATABASE_URL=postgresql://username:password@localhost:5432/testsuite
test_pg:
	docker-compose -f scripts/docker-compose.yml up -d postgres
	bash scripts/test.sh -svv
	docker-compose -f scripts/docker-compose.yml stop postgres

test_mysql: export DATABASE_URL=mysql://username:password@127.0.0.1:3306/testsuite
test_mysql:
	docker-compose -f "scripts/docker-compose.yml" up -d mysql
	bash scripts/test.sh -svv
	docker-compose -f scripts/docker-compose.yml stop mysql

test_sqlite:
	bash scripts/test.sh -svv

test_docs:
	bash scripts/test_docs.sh -svv

test:
	pytest -svv tests/

coverage:
	pytest --cov=ormar --cov=tests --cov-fail-under=100 --cov-report=term-missing tests

type_check:
	mkdir -p .mypy_cache && poetry run python -m mypy ormar tests --ignore-missing-imports --install-types --non-interactive

lint:
	poetry run python -m ruff check . --fix

fmt:
	poetry run python -m black .

pre-commit: fmt lint type_check