ソースを参照

Measure testing coverage on pull request (#271)

Michael Diskin 4 年 前
コミット
fccc591944
3 ファイル変更19 行追加3 行削除
  1. 14 3
      .circleci/config.yml
  2. 4 0
      codecov.yml
  3. 1 0
      requirements-dev.txt

+ 14 - 3
.circleci/config.yml

@@ -29,8 +29,12 @@ jobs:
           command: pip install -e . --install-option="--buildgo"
           name: setup
       - run:
-          command: pytest ./tests
+          command: pytest --cov=hivemind ./tests
           name: tests
+      - run:
+          command: codecov
+          name: codecov
+
   build-and-test-py38:
     docker:
       - image: circleci/python:3.8.1
@@ -53,8 +57,12 @@ jobs:
           command: pip install -e . --install-option="--buildgo"
           name: setup
       - run:
-          command: pytest ./tests
+          command: pytest --cov=hivemind ./tests
           name: tests
+      - run:
+          command: codecov
+          name: codecov
+
   build-and-test-py39:
     docker:
       - image: circleci/python:3.9.1
@@ -77,8 +85,11 @@ jobs:
           command: pip install -e . --install-option="--buildgo"
           name: setup
       - run:
-          command: pytest ./tests
+          command: pytest --cov=hivemind ./tests
           name: tests
+      - run:
+          command: codecov
+          name: codecov
 
 workflows:
   main:

+ 4 - 0
codecov.yml

@@ -0,0 +1,4 @@
+comment:
+  layout: "diff, files"
+  behavior: default
+  require_changes: true

+ 1 - 0
requirements-dev.txt

@@ -1,6 +1,7 @@
 pytest
 pytest-forked
 pytest-asyncio
+pytest-cov
 codecov
 tqdm
 scikit-learn