Skip to content

Commit 66c38d8

Browse files
committed
build(test): 修改 Makefile 的测试命令
1 parent d38e1d9 commit 66c38d8

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ build:
1313
# 单元测试
1414
test:
1515
$(PIP) install pytest pytest-cov; \
16-
chmod +x ./test_env.sh; \
17-
./test_env.sh
16+
grep -v '^#' .env; \
17+
export $(grep -v '^#' .env | xargs); \
18+
pytest -s --cov-config=./.coveragerc --cov-report html --cov-report xml --cov=./
19+
20+
test-pro:
21+
$(PIP) install pytest pytest-cov; \
22+
grep -v '^#' .env-pro; \
23+
export $(grep -v '^#' .env-pro | xargs); \
24+
pytest -s --cov-config=./.coveragerc --cov-report html --cov-report xml --cov=./
1825

1926
upload-test:
2027
$(PIP) install twine; \
@@ -45,4 +52,4 @@ clean:
4552
tests/__pycache__/ \
4653
.bge/tmp/*
4754

48-
.PHONY: test upload upload-test build install changelog clean
55+
.PHONY: test test-pro upload upload-test build install changelog clean

0 commit comments

Comments
 (0)