forked from launchdarkly/python-server-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (26 loc) · 1.18 KB
/
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
35
36
37
38
39
40
41
PYTEST_FLAGS=-W error::SyntaxWarning
test:
LD_SKIP_DATABASE_TESTS=1 pytest $(PYTEST_FLAGS)
test-all:
pytest $(PYTEST_FLAGS)
lint:
mypy --install-types --non-interactive --config-file mypy.ini ldclient testing
docs:
cd docs && make html
.PHONY: test test-all lint docs
TEMP_TEST_OUTPUT=/tmp/contract-test-service.log
# port 8000 and 9000 is already used in the CI environment because we're
# running a DynamoDB container and an SSE contract test
PORT=10000
build-contract-tests:
@cd contract-tests && pip install -r requirements.txt
start-contract-test-service:
@cd contract-tests && python service.py $(PORT)
start-contract-test-service-bg:
@echo "Test service output will be captured in $(TEMP_TEST_OUTPUT)"
@make start-contract-test-service >$(TEMP_TEST_OUTPUT) 2>&1 &
run-contract-tests:
@curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/v1.0.0/downloader/run.sh \
| VERSION=v1 PARAMS="-url http://localhost:$(PORT) -debug -stop-service-at-end $(TEST_HARNESS_PARAMS)" sh
contract-tests: build-contract-tests start-contract-test-service-bg run-contract-tests
.PHONY: build-contract-tests start-contract-test-service run-contract-tests contract-tests