-
Notifications
You must be signed in to change notification settings - Fork 172
/
Makefile
34 lines (25 loc) · 912 Bytes
/
Makefile
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
FLAKE8?= flake8
MYPY?= mypy
PYTEST?= pytest
REPOLOGY_TEST_DUMP_PATH?= .
lint:: check test flake8 mypy
test::
${PYTEST} ${PYTEST_ARGS} -v -rs
canonize::
${PYTEST} ${PYTEST_ARGS} -v -rs -k _regress --regtest-reset
test-make-dump::
psql -U repology_test -At -c "select tablename from pg_tables where schemaname = 'public'" | \
sed -e 's|.*|drop table & cascade;|' | psql -U repology_test
env REPOLOGY_CONFIG=./repology-test.conf.default ./repology-update.py -ippd
pg_dump -U repology_test -c \
| grep -v '^CREATE EXTENSION' \
| grep -v '^COMMENT ON EXTENSION' \
| grep -v '^DROP EXTENSION' \
> ${REPOLOGY_TEST_DUMP_PATH}/repology_test.sql
flake8:
${FLAKE8} *.py repology tests
mypy:
${MYPY} repology-update.py repology-dump.py repology tests
check:
python3 repology-schemacheck.py -s repos $$(find repos.d -name "*.yaml")
python3 repology-schemacheck.py -s maintainers maintainers.yaml