From 9f63822bac3b8efe6b810ee3329fa6229830e260 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 13 Aug 2024 02:22:52 -0700 Subject: [PATCH] configure coveralls orb in circle ci (#74) * configure coveralls orb in circle ci * trigger test rerun * exclude plot folder from coverage reporting * fix tab indent * fix coverage command * try to setup covearge omit files in setup.cfg * move the exclusion config to pyproject --------- Co-authored-by: Xiangyu Wang --- .circleci/config.yml | 7 ++++++- pyproject.toml | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c679c36..2e7de95b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2.1 orbs: + coveralls: coveralls/coveralls@2.0.0 python: circleci/python@1.5.0 # Define a job to be invoked later in a workflow. @@ -25,6 +26,7 @@ jobs: python -m unittest discover python -m unittest tests/tuner/test*.py coverage run --source . -m unittest discover + - coveralls/upload build-and-test-3-9: docker: - image: cimg/python:3.9 @@ -44,6 +46,7 @@ jobs: python -m unittest discover python -m unittest tests/tuner/test*.py coverage run --source . -m unittest discover + - coveralls/upload build-and-test-3-10: docker: - image: cimg/python:3.10 @@ -63,6 +66,7 @@ jobs: python -m unittest discover python -m unittest tests/tuner/test*.py coverage run --source . -m unittest discover + - coveralls/upload build-and-test-3-11: docker: - image: cimg/python:3.11 @@ -82,8 +86,9 @@ jobs: python -m unittest discover python -m unittest tests/tuner/test*.py coverage run --source . -m unittest discover + - coveralls/upload -# Invoke jobs via workflows +# Invoke jobs via workflows. # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: sample: diff --git a/pyproject.toml b/pyproject.toml index 76b73191..b961de57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,4 +2,12 @@ requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" -[tool.setuptools_scm] \ No newline at end of file +[tool.setuptools_scm] + +[tool.coverage.run] +omit = [ + # Omit reproting coverage on tests files + "tests/*", + # Omit plot functions + "pydlm/plot/*", +] \ No newline at end of file