From 1f5fc95b6831a2b41c45f51b2eaf9aa92d100ab7 Mon Sep 17 00:00:00 2001 From: thomwolf Date: Tue, 30 Apr 2019 11:05:26 +0200 Subject: [PATCH] add code coverage --- .circleci/config.yml | 9 ++++++--- .coveragerc | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .coveragerc diff --git a/.circleci/config.yml b/.circleci/config.yml index 7296e07ca3..6f4434228a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,9 +7,11 @@ jobs: steps: - checkout - run: sudo pip install --progress-bar off . - - run: sudo pip install pytest ftfy spacy + - run: sudo pip install pytest codecov pytest-cov + - run: sudo pip install spacy ftfy==4.4.3 - run: sudo python -m spacy download en - run: python -m pytest -sv tests/ --runslow + - run: codecov build_py2: working_directory: ~/pytorch-pretrained-BERT docker: @@ -17,10 +19,11 @@ jobs: steps: - checkout - run: sudo pip install --progress-bar off . - - run: sudo pip install pytest spacy - - run: sudo pip install ftfy==4.4.3 + - run: sudo pip install pytest codecov pytest-cov + - run: sudo pip install spacy ftfy==4.4.3 - run: sudo python -m spacy download en - run: python -m pytest -sv tests/ --runslow + - run: codecov workflows: version: 2 build_and_test: diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000000..fe05dda9a8 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +source=pytorch_pretrained_bert +[report] +exclude_lines = + pragma: no cover + raise + except + register_parameter \ No newline at end of file