From 7f52a902cc9c94abbcd84bc05c93147bb9414a6b Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:10:49 -0400 Subject: [PATCH 1/9] add(tools): code coverage reporting for bot & web_api Running coverage.py via pytest-cov and uploading the results to codecov for tracking. https://codecov.io https://github.com/recipeyak/recipeyak/pull/95 https://github.com/pytest-dev/pytest-cov/ --- .circleci/config.yml | 8 ++++++++ bot/.coveragerc | 6 ++++++ bot/poetry.lock | 41 ++++++++++++++++++++++++++++++++++++--- bot/pyproject.toml | 2 ++ bot/s/test | 10 +++++++--- bot/s/upload-code-cov | 5 +++++ web_api/.coveragerc | 6 ++++++ web_api/poetry.lock | 24 ++++++++++++++++++++++- web_api/pyproject.toml | 1 + web_api/s/test | 9 ++++++--- web_api/s/upload-code-cov | 5 +++++ 11 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 bot/.coveragerc create mode 100755 bot/s/upload-code-cov create mode 100644 web_api/.coveragerc create mode 100755 web_api/s/upload-code-cov diff --git a/.circleci/config.yml b/.circleci/config.yml index 40cf64304..44e8ef6fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,6 +29,10 @@ jobs: name: run tests working_directory: bot command: ./s/test + - run: + name: upload code coverage + working_directory: bot + command: ./s/code-cov-upload bot_lint: docker: @@ -169,6 +173,10 @@ jobs: name: run tests working_directory: web_api command: ./s/test + - run: + name: upload code coverage + working_directory: web_api + command: ./s/code-cov-upload web_api_lint: docker: diff --git a/bot/.coveragerc b/bot/.coveragerc new file mode 100644 index 000000000..ef4bad55b --- /dev/null +++ b/bot/.coveragerc @@ -0,0 +1,6 @@ +[run] +omit = + .venv/* + venv/* + env/* + .env/* diff --git a/bot/poetry.lock b/bot/poetry.lock index 9fa5da995..98b767af5 100644 --- a/bot/poetry.lock +++ b/bot/poetry.lock @@ -138,6 +138,18 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "7.0" +[[package]] +category = "dev" +description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" +name = "codecov" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.1.7" + +[package.dependencies] +coverage = "*" +requests = ">=2.7.9" + [[package]] category = "main" description = "Cross-platform colored terminal text." @@ -146,6 +158,14 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "0.4.1" +[[package]] +category = "dev" +description = "Code coverage measurement for Python" +name = "coverage" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +version = "5.1" + [[package]] category = "main" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." @@ -514,7 +534,7 @@ category = "main" description = "C parser in Python" name = "pycparser" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = "*" version = "2.19" [[package]] @@ -606,6 +626,18 @@ version = "0.10.0" [package.dependencies] pytest = ">=3.0.6" +[[package]] +category = "dev" +description = "Pytest plugin for measuring coverage." +name = "pytest-cov" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "2.10.0" + +[package.dependencies] +coverage = ">=4.4" +pytest = ">=4.6" + [[package]] category = "dev" description = "Thin-wrapper around the mock package for easier use with py.test" @@ -833,7 +865,7 @@ python-versions = "*" version = "0.13.0" [metadata] -content-hash = "db8e6083fa850daf7536322eaa8e199063c951db22f3facb3dc7b5827ff215f4" +content-hash = "a10bf9d45d15298210fb7237ab8cfe02f5d0a3409771d021c09bd0215872f9a6" python-versions = "^3.7" [metadata.hashes] @@ -851,7 +883,9 @@ certifi = ["59b7658e26ca9c7339e00f8f4636cdfe59d34fa37b9b04f6f9e9926b3cece1a5", " cffi = ["041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774", "046ef9a22f5d3eed06334d01b1e836977eeef500d9b78e9ef693f9380ad0b83d", "066bc4c7895c91812eff46f4b1c285220947d4aa46fa0a2651ff85f2afae9c90", "066c7ff148ae33040c01058662d6752fd73fbc8e64787229ea8498c7d7f4041b", "2444d0c61f03dcd26dbf7600cf64354376ee579acad77aef459e34efcb438c63", "300832850b8f7967e278870c5d51e3819b9aad8f0a2c8dbe39ab11f119237f45", "34c77afe85b6b9e967bd8154e3855e847b70ca42043db6ad17f26899a3df1b25", "46de5fa00f7ac09f020729148ff632819649b3e05a007d286242c4882f7b1dc3", "4aa8ee7ba27c472d429b980c51e714a24f47ca296d53f4d7868075b175866f4b", "4d0004eb4351e35ed950c14c11e734182591465a33e960a4ab5e8d4f04d72647", "4e3d3f31a1e202b0f5a35ba3bc4eb41e2fc2b11c1eff38b362de710bcffb5016", "50bec6d35e6b1aaeb17f7c4e2b9374ebf95a8975d57863546fa83e8d31bdb8c4", "55cad9a6df1e2a1d62063f79d0881a414a906a6962bc160ac968cc03ed3efcfb", "5662ad4e4e84f1eaa8efce5da695c5d2e229c563f9d5ce5b0113f71321bcf753", "59b4dc008f98fc6ee2bb4fd7fc786a8d70000d058c2bbe2698275bc53a8d3fa7", "73e1ffefe05e4ccd7bcea61af76f36077b914f92b76f95ccf00b0c1b9186f3f9", "a1f0fd46eba2d71ce1589f7e50a9e2ffaeb739fb2c11e8192aa2b45d5f6cc41f", "a2e85dc204556657661051ff4bab75a84e968669765c8a2cd425918699c3d0e8", "a5457d47dfff24882a21492e5815f891c0ca35fefae8aa742c6c263dac16ef1f", "a8dccd61d52a8dae4a825cdbb7735da530179fea472903eb871a5513b5abbfdc", "ae61af521ed676cf16ae94f30fe202781a38d7178b6b4ab622e4eec8cefaff42", "b012a5edb48288f77a63dba0840c92d0504aa215612da4541b7b42d849bc83a3", "d2c5cfa536227f57f97c92ac30c8109688ace8fa4ac086d19d0af47d134e2909", "d42b5796e20aacc9d15e66befb7a345454eef794fdb0737d1af593447c6c8f45", "dee54f5d30d775f525894d67b1495625dd9322945e7fee00731952e0368ff42d", "e070535507bd6aa07124258171be2ee8dfc19119c28ca94c9dfb7efd23564512", "e1ff2748c84d97b065cc95429814cdba39bcbd77c9c85c89344b317dc0d9cbff", "ed851c75d1e0e043cbf5ca9a8e1b13c4c90f3fbd863dacb01c0808e2b5204201"] chardet = ["84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"] click = ["2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"] +codecov = ["491938ad774ea94a963d5d16354c7299e90422a33a353ba0d38d0943ed1d5091", "b67bb8029e8340a7bf22c71cbece5bd18c96261fdebc2f105ee4d5a005bc8728", "d8b8109f44edad03b24f5f189dac8de9b1e3dc3c791fa37eeaf8c7381503ec34"] colorama = ["05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d", "f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48"] +coverage = ["00f1d23f4336efc3b311ed0d807feb45098fc86dee1ca13b3d6768cdab187c8a", "01333e1bd22c59713ba8a79f088b3955946e293114479bbfc2e37d522be03355", "0cb4be7e784dcdc050fc58ef05b71aa8e89b7e6636b99967fadbdba694cf2b65", "0e61d9803d5851849c24f78227939c701ced6704f337cad0a91e0972c51c1ee7", "1601e480b9b99697a570cea7ef749e88123c04b92d84cedaa01e117436b4a0a9", "2742c7515b9eb368718cd091bad1a1b44135cc72468c731302b3d641895b83d1", "2d27a3f742c98e5c6b461ee6ef7287400a1956c11421eb574d843d9ec1f772f0", "402e1744733df483b93abbf209283898e9f0d67470707e3c7516d84f48524f55", "5c542d1e62eece33c306d66fe0a5c4f7f7b3c08fecc46ead86d7916684b36d6c", "5f2294dbf7875b991c381e3d5af2bcc3494d836affa52b809c91697449d0eda6", "6402bd2fdedabbdb63a316308142597534ea8e1895f4e7d8bf7476c5e8751fef", "66460ab1599d3cf894bb6baee8c684788819b71a5dc1e8fa2ecc152e5d752019", "782caea581a6e9ff75eccda79287daefd1d2631cc09d642b6ee2d6da21fc0a4e", "79a3cfd6346ce6c13145731d39db47b7a7b859c0272f02cdb89a3bdcbae233a0", "7a5bdad4edec57b5fb8dae7d3ee58622d626fd3a0be0dfceda162a7035885ecf", "8fa0cbc7ecad630e5b0f4f35b0f6ad419246b02bc750de7ac66db92667996d24", "a027ef0492ede1e03a8054e3c37b8def89a1e3c471482e9f046906ba4f2aafd2", "a3f3654d5734a3ece152636aad89f58afc9213c6520062db3978239db122f03c", "a82b92b04a23d3c8a581fc049228bafde988abacba397d57ce95fe95e0338ab4", "acf3763ed01af8410fc36afea23707d4ea58ba7e86a8ee915dfb9ceff9ef69d0", "adeb4c5b608574a3d647011af36f7586811a2c1197c861aedb548dd2453b41cd", "b83835506dfc185a319031cf853fa4bb1b3974b1f913f5bb1a0f3d98bdcded04", "bb28a7245de68bf29f6fb199545d072d1036a1917dca17a1e75bbb919e14ee8e", "bf9cb9a9fd8891e7efd2d44deb24b86d647394b9705b744ff6f8261e6f29a730", "c317eaf5ff46a34305b202e73404f55f7389ef834b8dbf4da09b9b9b37f76dd2", "dbe8c6ae7534b5b024296464f387d57c13caa942f6d8e6e0346f27e509f0f768", "de807ae933cfb7f0c7d9d981a053772452217df2bf38e7e6267c9cbf9545a796", "dead2ddede4c7ba6cb3a721870f5141c97dc7d85a079edb4bd8d88c3ad5b20c7", "dec5202bfe6f672d4511086e125db035a52b00f1648d6407cc8e526912c0353a", "e1ea316102ea1e1770724db01998d1603ed921c54a86a2efcb03428d5417e489", "f90bfc4ad18450c80b024036eaf91e4a246ae287701aaa88eaebebf150868052"] cryptography = ["02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c", "1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595", "369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad", "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651", "44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2", "4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff", "58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d", "6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42", "7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d", "73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e", "7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912", "90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793", "971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13", "a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7", "b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0", "b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879", "d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f", "de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9", "df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2", "ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf", "fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8"] databases = ["d365cff2035c5177ef5fd8c5abf6671da01189521da64848a01251c870daf48f"] decorator = ["86156361c50488b84a3f148056ea716ca587df2f0de1d34750d35c21312725de", "f069f3a01830ca754ba5258fde2278454a0b5b79e0d7f5c13b3b97e57d4acff6"] @@ -872,7 +906,7 @@ isort = ["c40744b6bc5162bbb39c1257fe298b7a393861d50978b565f3ccd9cb9de0182a", "f5 jedi = ["2bb0603e3506f708e792c7f4ad8fc2a7a9d9c2d292a358fbbd58da531695595b", "2c6bcd9545c7d6440951b12b44d373479bf18123a401a52025cf98563fbd826c"] lazy-object-proxy = ["159a745e61422217881c4de71f9eafd9d703b93af95618635849fe469a283661", "23f63c0821cc96a23332e45dfaa83266feff8adc72b9bcaef86c202af765244f", "3b11be575475db2e8a6e11215f5aa95b9ec14de658628776e10d96fa0b4dac13", "3f447aff8bc61ca8b42b73304f6a44fa0d915487de144652816f950a3f1ab821", "4ba73f6089cd9b9478bc0a4fa807b47dbdb8fad1d8f31a0f0a5dbf26a4527a71", "4f53eadd9932055eac465bd3ca1bd610e4d7141e1278012bd1f28646aebc1d0e", "64483bd7154580158ea90de5b8e5e6fc29a16a9b4db24f10193f0c1ae3f9d1ea", "6f72d42b0d04bfee2397aa1862262654b56922c20a9bb66bb76b6f0e5e4f9229", "7c7f1ec07b227bdc561299fa2328e85000f90179a2f44ea30579d38e037cb3d4", "7c8b1ba1e15c10b13cad4171cfa77f5bb5ec2580abc5a353907780805ebe158e", "8559b94b823f85342e10d3d9ca4ba5478168e1ac5658a8a2f18c991ba9c52c20", "a262c7dfb046f00e12a2bdd1bafaed2408114a89ac414b0af8755c696eb3fc16", "acce4e3267610c4fdb6632b3886fe3f2f7dd641158a843cf6b6a68e4ce81477b", "be089bb6b83fac7f29d357b2dc4cf2b8eb8d98fe9d9ff89f9ea6012970a853c7", "bfab710d859c779f273cc48fb86af38d6e9210f38287df0069a63e40b45a2f5c", "c10d29019927301d524a22ced72706380de7cfc50f767217485a912b4c8bd82a", "dd6e2b598849b3d7aee2295ac765a578879830fb8966f70be8cd472e6069932e", "e408f1eacc0a68fed0c08da45f31d0ebb38079f043328dce69ff133b95c29dc1"] markdown-html-finder = ["6c38c12051ffd98aa3a56e93a72d977fe7abf2c014b0f701379519ce67e6c09e", "6ea240b1b51f5f05d2b4484bcbb4d533b1681a08b021a1322ac42aca72b21ebf", "94f0674031be994ba2dccab1315b04e41a6e43ddf43c677d0276e5e457207e57", "e094e9dbee1f033df495a2178d2cc28704f7968976b127c4aa612040cb3ecd9b"] -markupsafe = ["00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", "09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", "09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", "1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", "24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", "43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", "46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", "500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", "535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", "62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", "6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", "717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", "79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", "7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", "88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", "8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", "98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", "9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", "9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", "ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", "b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", "b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", "b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", "ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", "c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", "cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", "e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"] +markupsafe = ["00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", "09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", "09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", "1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", "13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42", "24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", "43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", "46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", "500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", "535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", "596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b", "62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", "6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15", "6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", "717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", "79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", "7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", "88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", "8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", "98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", "9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", "9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", "ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", "b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", "b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", "b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", "ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", "c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", "cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", "cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2", "e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", "e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"] mccabe = ["ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", "dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"] milksnake = ["550ca1fc4222724149ee5a933e6bb8347630c0ed023a2a97701ab94fa256f6b4", "dfcd43b78bcf93897a75eea1dadf71c848319f19451cff4f3f3a628a5abe1688"] more-itertools = ["2112d2ca570bb7c3e53ea1a35cd5df42bb0fd10c45f0fb97178679c3c03d64c7", "c3e4748ba1aad8dba30a4886b0b1a2004f9a863837b8654e7059eebf727afa5a"] @@ -896,6 +930,7 @@ pylint = ["5d77031694a5fb97ea95e828c8d10fc770a1df6eb3906067aaed42201a8a6a09", "7 pyparsing = ["1873c03321fc118f4e9746baf201ff990ceb915f433f23b395f5580d1840cb2a", "9b6323ef4ab914af344ba97510e966d64ba91055d6b9afa6b30799340e89cc03"] pytest = ["4a784f1d4f2ef198fe9b7aef793e9fa1a3b2f84e822d9b3a64a181293a572d45", "926855726d8ae8371803f7b2e6ec0a69953d9c6311fa7c3b6c1b929ff92d27da"] pytest-asyncio = ["9fac5100fd716cbecf6ef89233e8590a4ad61d729d1732e0a96b84182df1daaf", "d734718e25cfc32d2bf78d346e99d33724deeba774cc4afdf491530c6184b63b"] +pytest-cov = ["1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87", "6e6d18092dce6fad667cd7020deed816f858ad3b49d5b5e2b1cc1c97a4dba65c"] pytest-mock = ["43ce4e9dd5074993e7c021bb1c22cbb5363e612a2b5a76bc6d956775b10758b7", "5bf5771b1db93beac965a7347dc81c675ec4090cb841e49d9d34637a25c30568"] python-dateutil = ["7e6584c74aeed623791615e26efd690f29817a27c73085b78e4bad02493df2fb", "c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e"] requests = ["11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4", "9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"] diff --git a/bot/pyproject.toml b/bot/pyproject.toml index 340762cb1..4448012bf 100644 --- a/bot/pyproject.toml +++ b/bot/pyproject.toml @@ -41,6 +41,8 @@ pylint = "^2.3" flake8 = "^3.7" flake8-pie = "^0.2.1" isort = "^4.3" +pytest-cov = "^2.10" +codecov = "^2.1" [tool.poetry.plugins."pytest11"] "pytest_plugin" = "pytest_plugin.plugin" diff --git a/bot/s/test b/bot/s/test index b2a180bc4..eece72ae7 100755 --- a/bot/s/test +++ b/bot/s/test @@ -1,5 +1,9 @@ #!/usr/bin/env bash -set -eux +set -ex -# test code -poetry run pytest "$@" + +if [ "$CI" ]; then + poetry run pytest --cov=. --cov-report xml "$@" +else + poetry run pytest "$@" +fi diff --git a/bot/s/upload-code-cov b/bot/s/upload-code-cov new file mode 100755 index 000000000..c3c36809a --- /dev/null +++ b/bot/s/upload-code-cov @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +poetry run codecov diff --git a/web_api/.coveragerc b/web_api/.coveragerc new file mode 100644 index 000000000..ef4bad55b --- /dev/null +++ b/web_api/.coveragerc @@ -0,0 +1,6 @@ +[run] +omit = + .venv/* + venv/* + env/* + .env/* diff --git a/web_api/poetry.lock b/web_api/poetry.lock index ae455ecd3..6838857b6 100644 --- a/web_api/poetry.lock +++ b/web_api/poetry.lock @@ -106,6 +106,18 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "7.0" +[[package]] +category = "dev" +description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" +name = "codecov" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.1.7" + +[package.dependencies] +coverage = "*" +requests = ">=2.7.9" + [[package]] category = "dev" description = "Cross-platform colored terminal text." @@ -115,6 +127,14 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" version = "0.4.3" +[[package]] +category = "dev" +description = "Code coverage measurement for Python" +name = "coverage" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +version = "5.1" + [[package]] category = "dev" description = "Decorators for Humans" @@ -729,7 +749,7 @@ python-versions = "*" version = "0.13.0" [metadata] -content-hash = "8ba758cc29006257173b89ae46f1dc36c825868fec313bfcdcb6287a1c5c7314" +content-hash = "b6993bc4123950efd9eb481d5e111862dc78e4b2a76113b677b74297542a8790" python-versions = "^3.7" [metadata.hashes] @@ -744,7 +764,9 @@ black = ["1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b", "c2 certifi = ["017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3", "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"] chardet = ["84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"] click = ["2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"] +codecov = ["491938ad774ea94a963d5d16354c7299e90422a33a353ba0d38d0943ed1d5091", "b67bb8029e8340a7bf22c71cbece5bd18c96261fdebc2f105ee4d5a005bc8728", "d8b8109f44edad03b24f5f189dac8de9b1e3dc3c791fa37eeaf8c7381503ec34"] colorama = ["7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff", "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"] +coverage = ["00f1d23f4336efc3b311ed0d807feb45098fc86dee1ca13b3d6768cdab187c8a", "01333e1bd22c59713ba8a79f088b3955946e293114479bbfc2e37d522be03355", "0cb4be7e784dcdc050fc58ef05b71aa8e89b7e6636b99967fadbdba694cf2b65", "0e61d9803d5851849c24f78227939c701ced6704f337cad0a91e0972c51c1ee7", "1601e480b9b99697a570cea7ef749e88123c04b92d84cedaa01e117436b4a0a9", "2742c7515b9eb368718cd091bad1a1b44135cc72468c731302b3d641895b83d1", "2d27a3f742c98e5c6b461ee6ef7287400a1956c11421eb574d843d9ec1f772f0", "402e1744733df483b93abbf209283898e9f0d67470707e3c7516d84f48524f55", "5c542d1e62eece33c306d66fe0a5c4f7f7b3c08fecc46ead86d7916684b36d6c", "5f2294dbf7875b991c381e3d5af2bcc3494d836affa52b809c91697449d0eda6", "6402bd2fdedabbdb63a316308142597534ea8e1895f4e7d8bf7476c5e8751fef", "66460ab1599d3cf894bb6baee8c684788819b71a5dc1e8fa2ecc152e5d752019", "782caea581a6e9ff75eccda79287daefd1d2631cc09d642b6ee2d6da21fc0a4e", "79a3cfd6346ce6c13145731d39db47b7a7b859c0272f02cdb89a3bdcbae233a0", "7a5bdad4edec57b5fb8dae7d3ee58622d626fd3a0be0dfceda162a7035885ecf", "8fa0cbc7ecad630e5b0f4f35b0f6ad419246b02bc750de7ac66db92667996d24", "a027ef0492ede1e03a8054e3c37b8def89a1e3c471482e9f046906ba4f2aafd2", "a3f3654d5734a3ece152636aad89f58afc9213c6520062db3978239db122f03c", "a82b92b04a23d3c8a581fc049228bafde988abacba397d57ce95fe95e0338ab4", "acf3763ed01af8410fc36afea23707d4ea58ba7e86a8ee915dfb9ceff9ef69d0", "adeb4c5b608574a3d647011af36f7586811a2c1197c861aedb548dd2453b41cd", "b83835506dfc185a319031cf853fa4bb1b3974b1f913f5bb1a0f3d98bdcded04", "bb28a7245de68bf29f6fb199545d072d1036a1917dca17a1e75bbb919e14ee8e", "bf9cb9a9fd8891e7efd2d44deb24b86d647394b9705b744ff6f8261e6f29a730", "c317eaf5ff46a34305b202e73404f55f7389ef834b8dbf4da09b9b9b37f76dd2", "dbe8c6ae7534b5b024296464f387d57c13caa942f6d8e6e0346f27e509f0f768", "de807ae933cfb7f0c7d9d981a053772452217df2bf38e7e6267c9cbf9545a796", "dead2ddede4c7ba6cb3a721870f5141c97dc7d85a079edb4bd8d88c3ad5b20c7", "dec5202bfe6f672d4511086e125db035a52b00f1648d6407cc8e526912c0353a", "e1ea316102ea1e1770724db01998d1603ed921c54a86a2efcb03428d5417e489", "f90bfc4ad18450c80b024036eaf91e4a246ae287701aaa88eaebebf150868052"] decorator = ["54c38050039232e1db4ad7375cfce6748d7b41c29e95a081c8a6d2c30364a2ce", "5d19b92a3c8f7f101c8dd86afd86b0f061a8ce4540ab8cd401fa2542756bce6d"] dj-database-url = ["4aeaeb1f573c74835b0686a2b46b85990571159ffc21aa57ecd4d1e1cb334163", "851785365761ebe4994a921b433062309eb882fedd318e1b0fcecc607ed02da9"] django = ["2f1ba1db8648484dd5c238fb62504777b7ad090c81c5f1fd8d5eb5ec21b5f283", "c91c91a7ad6ef67a874a4f76f58ba534f9208412692a840e1d125eb5c279cb0a"] diff --git a/web_api/pyproject.toml b/web_api/pyproject.toml index 019f34a2e..a64facc59 100644 --- a/web_api/pyproject.toml +++ b/web_api/pyproject.toml @@ -35,6 +35,7 @@ typing_extensions = "^3.7" pytest-env = "^0.6.2" pytest-mock = "^2.0" ipdb = "^0.12.3" +codecov = "^2.1" [build-system] requires = ["poetry>=0.12"] diff --git a/web_api/s/test b/web_api/s/test index b2a180bc4..92099f975 100755 --- a/web_api/s/test +++ b/web_api/s/test @@ -1,5 +1,8 @@ #!/usr/bin/env bash -set -eux +set -ex -# test code -poetry run pytest "$@" +if [ "$CI" ]; then + poetry run pytest --cov=. --cov-report xml "$@" +else + poetry run pytest "$@" +fi diff --git a/web_api/s/upload-code-cov b/web_api/s/upload-code-cov new file mode 100755 index 000000000..c3c36809a --- /dev/null +++ b/web_api/s/upload-code-cov @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +poetry run codecov From 429ca4662f3fc68c80b3f44a95b9a08fe4410c29 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:14:34 -0400 Subject: [PATCH 2/9] fix typo in ci cfg --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 44e8ef6fe..dd0050c97 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ jobs: - run: name: upload code coverage working_directory: bot - command: ./s/code-cov-upload + command: ./s/upload-code-cov bot_lint: docker: @@ -176,7 +176,7 @@ jobs: - run: name: upload code coverage working_directory: web_api - command: ./s/code-cov-upload + command: ./s/upload-code-cov web_api_lint: docker: From 7da30aa870cfa4c7529eafc304e466cce715963e Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:23:27 -0400 Subject: [PATCH 3/9] add missing pytest-cov dep --- web_api/poetry.lock | 15 ++++++++++++++- web_api/pyproject.toml | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/web_api/poetry.lock b/web_api/poetry.lock index 6838857b6..a0733f43a 100644 --- a/web_api/poetry.lock +++ b/web_api/poetry.lock @@ -526,6 +526,18 @@ wcwidth = "*" python = "<3.8" version = ">=0.12" +[[package]] +category = "dev" +description = "Pytest plugin for measuring coverage." +name = "pytest-cov" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "2.10.0" + +[package.dependencies] +coverage = ">=4.4" +pytest = ">=4.6" + [[package]] category = "dev" description = "A Django plugin for pytest." @@ -749,7 +761,7 @@ python-versions = "*" version = "0.13.0" [metadata] -content-hash = "b6993bc4123950efd9eb481d5e111862dc78e4b2a76113b677b74297542a8790" +content-hash = "e0c4a03b82d24e9bfb2d14803f877610106f5b0f433afb70c8eedfea13deb423" python-versions = "^3.7" [metadata.hashes] @@ -805,6 +817,7 @@ pygments = ["2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b", pylint = ["3db5468ad013380e987410a8d6956226963aed94ecb5f9d3a28acca6d9ac36cd", "886e6afc935ea2590b462664b161ca9a5e40168ea99e5300935f6591ad467df4"] pyparsing = ["4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f", "c342dccb5250c08d45fd6f8b4a559613ca603b57498511740e65cd11a2e7dcec"] pytest = ["0d5fe9189a148acc3c3eb2ac8e1ac0742cb7618c084f3d228baaec0c254b318d", "ff615c761e25eb25df19edddc0b970302d2a9091fbce0e7213298d85fb61fef6"] +pytest-cov = ["1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87", "6e6d18092dce6fad667cd7020deed816f858ad3b49d5b5e2b1cc1c97a4dba65c"] pytest-django = ["456fa6854d04ee625d6bbb8b38ca2259e7040a6f93333bfe8bc8159b7e987203", "489b904f695f9fb880ce591cf5a4979880afb467763b1f180c07574554bdfd26"] pytest-env = ["7e94956aef7f2764f3c147d216ce066bf6c42948bb9e293169b1b1c880a580c2"] pytest-mock = ["b35eb281e93aafed138db25c8772b95d3756108b601947f89af503f8c629413f", "cb67402d87d5f53c579263d37971a164743dc33c159dfb4fb4a86f37c5552307"] diff --git a/web_api/pyproject.toml b/web_api/pyproject.toml index a64facc59..72a43454e 100644 --- a/web_api/pyproject.toml +++ b/web_api/pyproject.toml @@ -36,6 +36,7 @@ pytest-env = "^0.6.2" pytest-mock = "^2.0" ipdb = "^0.12.3" codecov = "^2.1" +pytest-cov = "^2.10" [build-system] requires = ["poetry>=0.12"] From 299bae13479bd406dcbdc8ed859d133538df18d4 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:29:11 -0400 Subject: [PATCH 4/9] give bash upload a shot https://docs.codecov.io/docs/about-the-codecov-bash-uploader --- bot/poetry.lock | 15 +-------------- bot/pyproject.toml | 1 - bot/s/upload-code-cov | 2 +- web_api/poetry.lock | 15 +-------------- web_api/pyproject.toml | 1 - web_api/s/upload-code-cov | 2 +- 6 files changed, 4 insertions(+), 32 deletions(-) diff --git a/bot/poetry.lock b/bot/poetry.lock index 98b767af5..bd5575912 100644 --- a/bot/poetry.lock +++ b/bot/poetry.lock @@ -138,18 +138,6 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "7.0" -[[package]] -category = "dev" -description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" -name = "codecov" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.1.7" - -[package.dependencies] -coverage = "*" -requests = ">=2.7.9" - [[package]] category = "main" description = "Cross-platform colored terminal text." @@ -865,7 +853,7 @@ python-versions = "*" version = "0.13.0" [metadata] -content-hash = "a10bf9d45d15298210fb7237ab8cfe02f5d0a3409771d021c09bd0215872f9a6" +content-hash = "590670418c711cbef7436474226aaa1286c890271e3e64e621dd27119f765c72" python-versions = "^3.7" [metadata.hashes] @@ -883,7 +871,6 @@ certifi = ["59b7658e26ca9c7339e00f8f4636cdfe59d34fa37b9b04f6f9e9926b3cece1a5", " cffi = ["041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774", "046ef9a22f5d3eed06334d01b1e836977eeef500d9b78e9ef693f9380ad0b83d", "066bc4c7895c91812eff46f4b1c285220947d4aa46fa0a2651ff85f2afae9c90", "066c7ff148ae33040c01058662d6752fd73fbc8e64787229ea8498c7d7f4041b", "2444d0c61f03dcd26dbf7600cf64354376ee579acad77aef459e34efcb438c63", "300832850b8f7967e278870c5d51e3819b9aad8f0a2c8dbe39ab11f119237f45", "34c77afe85b6b9e967bd8154e3855e847b70ca42043db6ad17f26899a3df1b25", "46de5fa00f7ac09f020729148ff632819649b3e05a007d286242c4882f7b1dc3", "4aa8ee7ba27c472d429b980c51e714a24f47ca296d53f4d7868075b175866f4b", "4d0004eb4351e35ed950c14c11e734182591465a33e960a4ab5e8d4f04d72647", "4e3d3f31a1e202b0f5a35ba3bc4eb41e2fc2b11c1eff38b362de710bcffb5016", "50bec6d35e6b1aaeb17f7c4e2b9374ebf95a8975d57863546fa83e8d31bdb8c4", "55cad9a6df1e2a1d62063f79d0881a414a906a6962bc160ac968cc03ed3efcfb", "5662ad4e4e84f1eaa8efce5da695c5d2e229c563f9d5ce5b0113f71321bcf753", "59b4dc008f98fc6ee2bb4fd7fc786a8d70000d058c2bbe2698275bc53a8d3fa7", "73e1ffefe05e4ccd7bcea61af76f36077b914f92b76f95ccf00b0c1b9186f3f9", "a1f0fd46eba2d71ce1589f7e50a9e2ffaeb739fb2c11e8192aa2b45d5f6cc41f", "a2e85dc204556657661051ff4bab75a84e968669765c8a2cd425918699c3d0e8", "a5457d47dfff24882a21492e5815f891c0ca35fefae8aa742c6c263dac16ef1f", "a8dccd61d52a8dae4a825cdbb7735da530179fea472903eb871a5513b5abbfdc", "ae61af521ed676cf16ae94f30fe202781a38d7178b6b4ab622e4eec8cefaff42", "b012a5edb48288f77a63dba0840c92d0504aa215612da4541b7b42d849bc83a3", "d2c5cfa536227f57f97c92ac30c8109688ace8fa4ac086d19d0af47d134e2909", "d42b5796e20aacc9d15e66befb7a345454eef794fdb0737d1af593447c6c8f45", "dee54f5d30d775f525894d67b1495625dd9322945e7fee00731952e0368ff42d", "e070535507bd6aa07124258171be2ee8dfc19119c28ca94c9dfb7efd23564512", "e1ff2748c84d97b065cc95429814cdba39bcbd77c9c85c89344b317dc0d9cbff", "ed851c75d1e0e043cbf5ca9a8e1b13c4c90f3fbd863dacb01c0808e2b5204201"] chardet = ["84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"] click = ["2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"] -codecov = ["491938ad774ea94a963d5d16354c7299e90422a33a353ba0d38d0943ed1d5091", "b67bb8029e8340a7bf22c71cbece5bd18c96261fdebc2f105ee4d5a005bc8728", "d8b8109f44edad03b24f5f189dac8de9b1e3dc3c791fa37eeaf8c7381503ec34"] colorama = ["05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d", "f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48"] coverage = ["00f1d23f4336efc3b311ed0d807feb45098fc86dee1ca13b3d6768cdab187c8a", "01333e1bd22c59713ba8a79f088b3955946e293114479bbfc2e37d522be03355", "0cb4be7e784dcdc050fc58ef05b71aa8e89b7e6636b99967fadbdba694cf2b65", "0e61d9803d5851849c24f78227939c701ced6704f337cad0a91e0972c51c1ee7", "1601e480b9b99697a570cea7ef749e88123c04b92d84cedaa01e117436b4a0a9", "2742c7515b9eb368718cd091bad1a1b44135cc72468c731302b3d641895b83d1", "2d27a3f742c98e5c6b461ee6ef7287400a1956c11421eb574d843d9ec1f772f0", "402e1744733df483b93abbf209283898e9f0d67470707e3c7516d84f48524f55", "5c542d1e62eece33c306d66fe0a5c4f7f7b3c08fecc46ead86d7916684b36d6c", "5f2294dbf7875b991c381e3d5af2bcc3494d836affa52b809c91697449d0eda6", "6402bd2fdedabbdb63a316308142597534ea8e1895f4e7d8bf7476c5e8751fef", "66460ab1599d3cf894bb6baee8c684788819b71a5dc1e8fa2ecc152e5d752019", "782caea581a6e9ff75eccda79287daefd1d2631cc09d642b6ee2d6da21fc0a4e", "79a3cfd6346ce6c13145731d39db47b7a7b859c0272f02cdb89a3bdcbae233a0", "7a5bdad4edec57b5fb8dae7d3ee58622d626fd3a0be0dfceda162a7035885ecf", "8fa0cbc7ecad630e5b0f4f35b0f6ad419246b02bc750de7ac66db92667996d24", "a027ef0492ede1e03a8054e3c37b8def89a1e3c471482e9f046906ba4f2aafd2", "a3f3654d5734a3ece152636aad89f58afc9213c6520062db3978239db122f03c", "a82b92b04a23d3c8a581fc049228bafde988abacba397d57ce95fe95e0338ab4", "acf3763ed01af8410fc36afea23707d4ea58ba7e86a8ee915dfb9ceff9ef69d0", "adeb4c5b608574a3d647011af36f7586811a2c1197c861aedb548dd2453b41cd", "b83835506dfc185a319031cf853fa4bb1b3974b1f913f5bb1a0f3d98bdcded04", "bb28a7245de68bf29f6fb199545d072d1036a1917dca17a1e75bbb919e14ee8e", "bf9cb9a9fd8891e7efd2d44deb24b86d647394b9705b744ff6f8261e6f29a730", "c317eaf5ff46a34305b202e73404f55f7389ef834b8dbf4da09b9b9b37f76dd2", "dbe8c6ae7534b5b024296464f387d57c13caa942f6d8e6e0346f27e509f0f768", "de807ae933cfb7f0c7d9d981a053772452217df2bf38e7e6267c9cbf9545a796", "dead2ddede4c7ba6cb3a721870f5141c97dc7d85a079edb4bd8d88c3ad5b20c7", "dec5202bfe6f672d4511086e125db035a52b00f1648d6407cc8e526912c0353a", "e1ea316102ea1e1770724db01998d1603ed921c54a86a2efcb03428d5417e489", "f90bfc4ad18450c80b024036eaf91e4a246ae287701aaa88eaebebf150868052"] cryptography = ["02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c", "1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595", "369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad", "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651", "44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2", "4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff", "58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d", "6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42", "7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d", "73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e", "7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912", "90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793", "971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13", "a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7", "b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0", "b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879", "d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f", "de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9", "df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2", "ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf", "fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8"] diff --git a/bot/pyproject.toml b/bot/pyproject.toml index 4448012bf..fc31ce50a 100644 --- a/bot/pyproject.toml +++ b/bot/pyproject.toml @@ -42,7 +42,6 @@ flake8 = "^3.7" flake8-pie = "^0.2.1" isort = "^4.3" pytest-cov = "^2.10" -codecov = "^2.1" [tool.poetry.plugins."pytest11"] "pytest_plugin" = "pytest_plugin.plugin" diff --git a/bot/s/upload-code-cov b/bot/s/upload-code-cov index c3c36809a..f6b0f55b7 100755 --- a/bot/s/upload-code-cov +++ b/bot/s/upload-code-cov @@ -2,4 +2,4 @@ set -ex -poetry run codecov +bash <(curl -s https://codecov.io/bash) diff --git a/web_api/poetry.lock b/web_api/poetry.lock index a0733f43a..eecc12206 100644 --- a/web_api/poetry.lock +++ b/web_api/poetry.lock @@ -106,18 +106,6 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "7.0" -[[package]] -category = "dev" -description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" -name = "codecov" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.1.7" - -[package.dependencies] -coverage = "*" -requests = ">=2.7.9" - [[package]] category = "dev" description = "Cross-platform colored terminal text." @@ -761,7 +749,7 @@ python-versions = "*" version = "0.13.0" [metadata] -content-hash = "e0c4a03b82d24e9bfb2d14803f877610106f5b0f433afb70c8eedfea13deb423" +content-hash = "d2463c9c71ed99da53fc548916ff294a21e486c06f818b8b0990b0537382dc1a" python-versions = "^3.7" [metadata.hashes] @@ -776,7 +764,6 @@ black = ["1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b", "c2 certifi = ["017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3", "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"] chardet = ["84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"] click = ["2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"] -codecov = ["491938ad774ea94a963d5d16354c7299e90422a33a353ba0d38d0943ed1d5091", "b67bb8029e8340a7bf22c71cbece5bd18c96261fdebc2f105ee4d5a005bc8728", "d8b8109f44edad03b24f5f189dac8de9b1e3dc3c791fa37eeaf8c7381503ec34"] colorama = ["7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff", "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"] coverage = ["00f1d23f4336efc3b311ed0d807feb45098fc86dee1ca13b3d6768cdab187c8a", "01333e1bd22c59713ba8a79f088b3955946e293114479bbfc2e37d522be03355", "0cb4be7e784dcdc050fc58ef05b71aa8e89b7e6636b99967fadbdba694cf2b65", "0e61d9803d5851849c24f78227939c701ced6704f337cad0a91e0972c51c1ee7", "1601e480b9b99697a570cea7ef749e88123c04b92d84cedaa01e117436b4a0a9", "2742c7515b9eb368718cd091bad1a1b44135cc72468c731302b3d641895b83d1", "2d27a3f742c98e5c6b461ee6ef7287400a1956c11421eb574d843d9ec1f772f0", "402e1744733df483b93abbf209283898e9f0d67470707e3c7516d84f48524f55", "5c542d1e62eece33c306d66fe0a5c4f7f7b3c08fecc46ead86d7916684b36d6c", "5f2294dbf7875b991c381e3d5af2bcc3494d836affa52b809c91697449d0eda6", "6402bd2fdedabbdb63a316308142597534ea8e1895f4e7d8bf7476c5e8751fef", "66460ab1599d3cf894bb6baee8c684788819b71a5dc1e8fa2ecc152e5d752019", "782caea581a6e9ff75eccda79287daefd1d2631cc09d642b6ee2d6da21fc0a4e", "79a3cfd6346ce6c13145731d39db47b7a7b859c0272f02cdb89a3bdcbae233a0", "7a5bdad4edec57b5fb8dae7d3ee58622d626fd3a0be0dfceda162a7035885ecf", "8fa0cbc7ecad630e5b0f4f35b0f6ad419246b02bc750de7ac66db92667996d24", "a027ef0492ede1e03a8054e3c37b8def89a1e3c471482e9f046906ba4f2aafd2", "a3f3654d5734a3ece152636aad89f58afc9213c6520062db3978239db122f03c", "a82b92b04a23d3c8a581fc049228bafde988abacba397d57ce95fe95e0338ab4", "acf3763ed01af8410fc36afea23707d4ea58ba7e86a8ee915dfb9ceff9ef69d0", "adeb4c5b608574a3d647011af36f7586811a2c1197c861aedb548dd2453b41cd", "b83835506dfc185a319031cf853fa4bb1b3974b1f913f5bb1a0f3d98bdcded04", "bb28a7245de68bf29f6fb199545d072d1036a1917dca17a1e75bbb919e14ee8e", "bf9cb9a9fd8891e7efd2d44deb24b86d647394b9705b744ff6f8261e6f29a730", "c317eaf5ff46a34305b202e73404f55f7389ef834b8dbf4da09b9b9b37f76dd2", "dbe8c6ae7534b5b024296464f387d57c13caa942f6d8e6e0346f27e509f0f768", "de807ae933cfb7f0c7d9d981a053772452217df2bf38e7e6267c9cbf9545a796", "dead2ddede4c7ba6cb3a721870f5141c97dc7d85a079edb4bd8d88c3ad5b20c7", "dec5202bfe6f672d4511086e125db035a52b00f1648d6407cc8e526912c0353a", "e1ea316102ea1e1770724db01998d1603ed921c54a86a2efcb03428d5417e489", "f90bfc4ad18450c80b024036eaf91e4a246ae287701aaa88eaebebf150868052"] decorator = ["54c38050039232e1db4ad7375cfce6748d7b41c29e95a081c8a6d2c30364a2ce", "5d19b92a3c8f7f101c8dd86afd86b0f061a8ce4540ab8cd401fa2542756bce6d"] diff --git a/web_api/pyproject.toml b/web_api/pyproject.toml index 72a43454e..670bc7531 100644 --- a/web_api/pyproject.toml +++ b/web_api/pyproject.toml @@ -35,7 +35,6 @@ typing_extensions = "^3.7" pytest-env = "^0.6.2" pytest-mock = "^2.0" ipdb = "^0.12.3" -codecov = "^2.1" pytest-cov = "^2.10" [build-system] diff --git a/web_api/s/upload-code-cov b/web_api/s/upload-code-cov index c3c36809a..f6b0f55b7 100755 --- a/web_api/s/upload-code-cov +++ b/web_api/s/upload-code-cov @@ -2,4 +2,4 @@ set -ex -poetry run codecov +bash <(curl -s https://codecov.io/bash) From 113d201f428db532fd60205e524e015d29c83559 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:33:16 -0400 Subject: [PATCH 5/9] shellcheck was right --- bot/s/upload-code-cov | 2 +- web_api/s/upload-code-cov | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/s/upload-code-cov b/bot/s/upload-code-cov index f6b0f55b7..bfbc950bb 100755 --- a/bot/s/upload-code-cov +++ b/bot/s/upload-code-cov @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -ex diff --git a/web_api/s/upload-code-cov b/web_api/s/upload-code-cov index f6b0f55b7..bfbc950bb 100755 --- a/web_api/s/upload-code-cov +++ b/web_api/s/upload-code-cov @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -ex From 28cf13831d18c5458da71470c2f4b071cefe48b2 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:46:29 -0400 Subject: [PATCH 6/9] add cfg for github status https://docs.codecov.io/docs/common-recipe-list#set-non-blocking-status-checks Might need to authorize the bot to set status as well --- codecov.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..bfdc9877d --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true From 647bcc99c9a06b6e43a940f5f322ac0232fa88d7 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:49:41 -0400 Subject: [PATCH 7/9] disable comments --- codecov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codecov.yml b/codecov.yml index bfdc9877d..40928b932 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,3 +1,5 @@ +comment: false + coverage: status: project: From 8de94ad0cee398db3637cd60b0640b8eafcc6599 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:50:20 -0400 Subject: [PATCH 8/9] don't require ci to pass to set status --- codecov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codecov.yml b/codecov.yml index 40928b932..d0278e3d4 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,3 +1,5 @@ +require_ci_to_pass: false + comment: false coverage: From 07d5520fe11a9701804cba79644b1143dd5990e3 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 18 Jun 2020 20:56:45 -0400 Subject: [PATCH 9/9] fix config --- codecov.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index d0278e3d4..97a964b3b 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,4 +1,5 @@ -require_ci_to_pass: false +codecov: + require_ci_to_pass: false comment: false